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