]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/syscall_sw.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
28 * Revision 1.1.1.1 1998/09/22 21:05:31 wsanchez
29 * Import of Mac OS X kernel (~semeria)
31 * Revision 1.2 1998/04/29 17:36:36 mburg
34 * Revision 1.2.22.1 1998/02/03 09:32:55 gdt
36 * [1998/02/03 09:17:02 gdt]
38 * Revision 1.2.20.1 1997/06/17 03:00:55 devrcs
40 * Added new definition of the rpc_return_trap.
41 * [1996/04/26 21:53:51 yfei]
43 * Revision 1.2.17.2 1996/02/16 00:07:27 yfei
44 * Merged NSWC based RPC enhancements into MK7_MAIN.
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]
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]
54 * Revision 1.2.9.1 1994/07/18 22:03:32 burke
56 * [1994/07/15 21:04:49 burke]
58 * Revision 1.2.7.3 1994/07/05 14:28:23 watkins
60 * [1994/07/05 14:27:30 watkins]
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]
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]
70 * Revision 1.2 1993/04/19 16:34:14 devrcs
72 * [1993/02/26 13:35:10 sp]
74 * Revision 1.1 1992/09/30 02:30:50 robert
81 * Revision 2.5 91/05/14 16:52:22 mrt
82 * Correcting copyright
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]
88 * Revision 2.3 90/12/05 23:46:16 af
89 * Made GNU preproc happy.
91 * Revision 2.2 90/05/03 15:48:01 dbg
93 * [90/04/30 16:36:25 dbg]
95 * Revision 1.3.1.1 89/12/22 22:22:03 rvb
99 * Revision 1.3 89/03/09 20:19:53 rpd
102 * Revision 1.2 89/02/26 13:01:00 gm0w
103 * Changes for cleanup.
105 * 31-Dec-88 Robert Baron (rvb) at Carnegie-Mellon University
106 * Derived from MACH2.0 vax release.
108 * 1-Sep-86 Michael Young (mwyoung) at Carnegie-Mellon University
109 * Created from mach_syscalls.h in the user library sources.
114 * Mach Operating System
115 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
116 * All Rights Reserved.
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.
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.
128 * Carnegie Mellon requests users of this software to return to
130 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
131 * School of Computer Science
132 * Carnegie Mellon University
133 * Pittsburgh PA 15213-3890
135 * any improvements or extensions that they make and grant Carnegie Mellon
136 * the rights to redistribute these changes.
141 #ifndef _MACH_I386_SYSCALL_SW_H_
142 #define _MACH_I386_SYSCALL_SW_H_
144 #include <architecture/i386/asm_help.h>
146 #define MACHCALLSEL $0x07
147 #define RPCCALLSEL $0x0f
149 #define kernel_trap(trap_name,trap_number,number_args) \
150 LEAF(_##trap_name,0) ;\
151 movl $##trap_number,%eax ;\
152 lcall MACHCALLSEL, $0 ;\
155 #define rpc_trap(trap_name,trap_number,number_args) \
156 LEAF(_##trap_name,0) ;\
157 movl $##trap_number,%eax; \
158 lcall RPCCALLSEL, $0 ;\
161 #define rpc_return_trap(trap_name,trap_number,number_args) \
162 LEAF(_##trap_name,0) ;\
164 movl $##trap_number,%eax; \
165 lcall RPCCALLSEL, $0 ;\
168 #endif /* _MACH_I386_SYSCALL_SW_H_ */