|
|
1.1 root 1: /*
2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * The contents of this file constitute Original Code as defined in and
7: * are subject to the Apple Public Source License Version 1.1 (the
8: * "License"). You may not use this file except in compliance with the
9: * License. Please obtain a copy of the License at
10: * http://www.apple.com/publicsource and read it before using this file.
11: *
12: * This Original Code and all software distributed under the License are
13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17: * License for the specific language governing rights and limitations
18: * under the License.
19: *
20: * @APPLE_LICENSE_HEADER_END@
21: */
22: /*
23: * @OSF_COPYRIGHT@
24: */
25: /*
26: * HISTORY
27: *
28: * Revision 1.1.1.1 1998/09/22 21:05:31 wsanchez
29: * Import of Mac OS X kernel (~semeria)
30: *
31: * Revision 1.2 1998/04/29 17:36:36 mburg
32: * MK7.3 merger
33: *
34: * Revision 1.2.22.1 1998/02/03 09:32:55 gdt
35: * Merge up to MK7.3
36: * [1998/02/03 09:17:02 gdt]
37: *
38: * Revision 1.2.20.1 1997/06/17 03:00:55 devrcs
39: * RPC Enhancements.
40: * Added new definition of the rpc_return_trap.
41: * [1996/04/26 21:53:51 yfei]
42: *
43: * Revision 1.2.17.2 1996/02/16 00:07:27 yfei
44: * Merged NSWC based RPC enhancements into MK7_MAIN.
45: *
46: * Revision 1.2.12.2 1994/09/23 02:37:42 ezf
47: * change marker to not FREE
48: * [1994/09/22 21:40:17 ezf]
49: *
50: * Revision 1.2.12.1 1994/08/26 20:48:44 watkins
51: * Merge with rt2_shared.
52: * [1994/08/26 18:38:55 watkins]
53: *
54: * Revision 1.2.9.1 1994/07/18 22:03:32 burke
55: * Check-in for merge.
56: * [1994/07/15 21:04:49 burke]
57: *
58: * Revision 1.2.7.3 1994/07/05 14:28:23 watkins
59: * Merge with rpc.
60: * [1994/07/05 14:27:30 watkins]
61: *
62: * Revision 1.2.6.1 1994/05/18 21:18:29 watkins
63: * Add macro for rpc call gate.
64: * [1994/05/18 21:16:19 watkins]
65: *
66: * Revision 1.2.2.2 1993/06/09 02:40:45 gm
67: * Added to OSF/1 R1.3 from NMK15.0.
68: * [1993/06/02 21:16:24 jeffc]
69: *
70: * Revision 1.2 1993/04/19 16:34:14 devrcs
71: * Fixes for ANSI C
72: * [1993/02/26 13:35:10 sp]
73: *
74: * Revision 1.1 1992/09/30 02:30:50 robert
75: * Initial revision
76: *
77: * $EndLog$
78: */
79: /* CMU_HIST */
80: /*
81: * Revision 2.5 91/05/14 16:52:22 mrt
82: * Correcting copyright
83: *
84: * Revision 2.4 91/02/05 17:32:17 mrt
85: * Changed to new Mach copyright
86: * [91/02/01 17:10:01 mrt]
87: *
88: * Revision 2.3 90/12/05 23:46:16 af
89: * Made GNU preproc happy.
90: *
91: * Revision 2.2 90/05/03 15:48:01 dbg
92: * Created.
93: * [90/04/30 16:36:25 dbg]
94: *
95: * Revision 1.3.1.1 89/12/22 22:22:03 rvb
96: * Use asm.h
97: * [89/12/22 rvb]
98: *
99: * Revision 1.3 89/03/09 20:19:53 rpd
100: * More cleanup.
101: *
102: * Revision 1.2 89/02/26 13:01:00 gm0w
103: * Changes for cleanup.
104: *
105: * 31-Dec-88 Robert Baron (rvb) at Carnegie-Mellon University
106: * Derived from MACH2.0 vax release.
107: *
108: * 1-Sep-86 Michael Young (mwyoung) at Carnegie-Mellon University
109: * Created from mach_syscalls.h in the user library sources.
110: *
111: */
112: /* CMU_ENDHIST */
113: /*
114: * Mach Operating System
115: * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
116: * All Rights Reserved.
117: *
118: * Permission to use, copy, modify and distribute this software and its
119: * documentation is hereby granted, provided that both the copyright
120: * notice and this permission notice appear in all copies of the
121: * software, derivative works or modified versions, and any portions
122: * thereof, and that both notices appear in supporting documentation.
123: *
124: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
125: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
126: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
127: *
128: * Carnegie Mellon requests users of this software to return to
129: *
130: * Software Distribution Coordinator or [email protected]
131: * School of Computer Science
132: * Carnegie Mellon University
133: * Pittsburgh PA 15213-3890
134: *
135: * any improvements or extensions that they make and grant Carnegie Mellon
136: * the rights to redistribute these changes.
137: */
138: /*
139: */
140:
141: #ifndef _MACH_I386_SYSCALL_SW_H_
142: #define _MACH_I386_SYSCALL_SW_H_
143:
144: #include <architecture/i386/asm_help.h>
145:
146: #define MACHCALLSEL 0x07
147: #define RPCCALLSEL 0x0f
148:
149: #define kernel_trap(trap_name,trap_number,number_args) \
150: LEAF(_##trap_name,0) ;\
151: movl $##trap_number,%eax ;\
152: lcall $##MACHCALLSEL, $0 ;\
153: END(_##trap_name)
154:
155: #define rpc_trap(trap_name,trap_number,number_args) \
156: LEAF(_##trap_name,0) ;\
157: movl $##trap_number,%eax; \
158: lcall $##RPCCALLSEL, $0 ;\
159: END(_##trap_name)
160:
161: #define rpc_return_trap(trap_name,trap_number,number_args) \
162: LEAF(_##trap_name,0) ;\
163: movl %eax, %ecx; \
164: movl $##trap_number,%eax; \
165: lcall $##RPCCALLSEL, $0 ;\
166: END(_##trap_name)
167:
168: #endif /* _MACH_I386_SYSCALL_SW_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.