FreeBSD/Linux Kernel Cross Reference
sys/mach/syscall_sw.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: syscall_sw.h,v $
29 * Revision 2.13 93/08/10 15:12:27 mrt
30 * Moved device_write traps to avoid conflict with atm traps.
31 * [93/07/03 cmaeda]
32 *
33 * Included traps for network interface.
34 * [93/06/09 15:45:40 jcb]
35 * Added device traps.
36 * [93/04/14 cmaeda]
37 *
38 * Added evc_wait_clear.
39 * [93/04/14 cmaeda]
40 *
41 * Revision 2.12 93/01/14 17:47:42 danner
42 * Cleanup.
43 * [92/06/10 pds]
44 *
45 * Revision 2.11 92/07/20 13:33:15 cmaeda
46 * Added set_ras_address (a unixoid trap).
47 * [92/05/11 14:38:24 cmaeda]
48 *
49 * Revision 2.10 92/02/19 16:07:22 elf
50 * Removed STANDALONE conditionals.
51 * [92/02/19 elf]
52 *
53 * Added syscall_thread_depress_abort.
54 * [92/01/20 rwd]
55 *
56 * Revision 2.9 92/01/15 13:44:35 rpd
57 * Changed MACH_IPC_COMPAT conditionals to default to not present.
58 *
59 * Revision 2.8 91/12/13 14:55:06 jsb
60 * Added evc_wait.
61 * [91/11/02 17:44:54 af]
62 *
63 * Revision 2.7 91/05/14 17:00:32 mrt
64 * Correcting copyright
65 *
66 * Revision 2.6 91/02/05 17:36:20 mrt
67 * Changed to new Mach copyright
68 * [91/02/01 17:21:07 mrt]
69 *
70 * Revision 2.5 90/09/09 14:33:12 rpd
71 * Added mach_port_allocate_name trap.
72 * [90/09/05 rwd]
73 *
74 * Revision 2.4 90/06/19 23:00:14 rpd
75 * Added pid_by_task.
76 * [90/06/14 rpd]
77 *
78 * Added mach_port_allocate, mach_port_deallocate, mach_port_insert_right.
79 * [90/06/02 rpd]
80 *
81 * Revision 2.3 90/06/02 14:59:58 rpd
82 * Removed syscall_vm_allocate_with_pager.
83 * [90/05/31 rpd]
84 *
85 * Added map_fd, rfs_make_symlink.
86 * [90/04/04 rpd]
87 * Converted to new IPC.
88 * [90/03/26 22:39:28 rpd]
89 *
90 * Revision 2.2 90/05/29 18:36:57 rwd
91 * New vm/task/threads calls from rfr.
92 * [90/04/20 rwd]
93 *
94 * Revision 2.1 89/08/03 16:03:28 rwd
95 * Created.
96 *
97 */
98
99 #ifndef _MACH_SYSCALL_SW_H_
100 #define _MACH_SYSCALL_SW_H_
101
102 /*
103 * The machine-dependent "syscall_sw.h" file should
104 * define a macro for
105 * kernel_trap(trap_name, trap_number, arg_count)
106 * which will expand into assembly code for the
107 * trap.
108 *
109 * N.B.: When adding calls, do not put spaces in the macros.
110 */
111
112 #include <mach/machine/syscall_sw.h>
113
114 /*
115 * These trap numbers should be taken from the
116 * table in <kern/syscall_sw.c>.
117 */
118
119 kernel_trap(evc_wait,-17,1)
120 kernel_trap(evc_wait_clear,-18,1)
121
122 kernel_trap(mach_msg_trap,-25,7)
123 kernel_trap(mach_reply_port,-26,0)
124 kernel_trap(mach_thread_self,-27,0)
125 kernel_trap(mach_task_self,-28,0)
126 kernel_trap(mach_host_self,-29,0)
127
128 kernel_trap(swtch_pri,-59,1)
129 kernel_trap(swtch,-60,0)
130 kernel_trap(thread_switch,-61,3)
131 kernel_trap(nw_update,-80,3)
132 kernel_trap(nw_lookup,-81,2)
133 kernel_trap(nw_endpoint_allocate,-82,4)
134 kernel_trap(nw_endpoint_deallocate,-83,1)
135 kernel_trap(nw_buffer_allocate,-84,2)
136 kernel_trap(nw_buffer_deallocate,-85,2)
137 kernel_trap(nw_connection_open,-86,4)
138 kernel_trap(nw_connection_accept,-87,3)
139 kernel_trap(nw_connection_close,-88,1)
140 kernel_trap(nw_multicast_add,-89,4)
141 kernel_trap(nw_multicast_drop,-90,4)
142 kernel_trap(nw_endpoint_status,-91,3)
143 kernel_trap(nw_send,-92,3)
144 kernel_trap(nw_receive,-93,2)
145 kernel_trap(nw_rpc,-94,4)
146 kernel_trap(nw_select,-95,3)
147
148
149 /*
150 * These are syscall versions of Mach kernel calls.
151 * They only work on local tasks.
152 */
153
154 kernel_trap(syscall_vm_map,-64,11)
155 kernel_trap(syscall_vm_allocate,-65,4)
156 kernel_trap(syscall_vm_deallocate,-66,3)
157
158 kernel_trap(syscall_task_create,-68,3)
159 kernel_trap(syscall_task_terminate,-69,1)
160 kernel_trap(syscall_task_suspend,-70,1)
161 kernel_trap(syscall_task_set_special_port,-71,3)
162
163 kernel_trap(syscall_mach_port_allocate,-72,3)
164 kernel_trap(syscall_mach_port_deallocate,-73,2)
165 kernel_trap(syscall_mach_port_insert_right,-74,4)
166 kernel_trap(syscall_mach_port_allocate_name,-75,3)
167 kernel_trap(syscall_thread_depress_abort,-76,1)
168
169 kernel_trap(syscall_device_writev_request,-39,6)
170 kernel_trap(syscall_device_write_request,-40,6)
171
172 /*
173 * These "Mach" traps are not implemented by the kernel;
174 * the emulation library and Unix server implement them.
175 * But they are traditionally part of libmach, and use
176 * the Mach trap calling conventions and numbering.
177 */
178
179 kernel_trap(task_by_pid,-33,1)
180 kernel_trap(pid_by_task,-34,4)
181 kernel_trap(init_process,-41,0)
182 kernel_trap(map_fd,-43,5)
183 kernel_trap(rfs_make_symlink,-44,3)
184 kernel_trap(htg_syscall,-52,3)
185 kernel_trap(set_ras_address,-53,2)
186
187 /* Traps for the old IPC interface. */
188
189 #if MACH_IPC_COMPAT
190
191 kernel_trap(task_self,-10,0)
192 kernel_trap(thread_reply,-11,0)
193 kernel_trap(task_notify,-12,0)
194 kernel_trap(thread_self,-13,0)
195 kernel_trap(msg_send_trap,-20,4)
196 kernel_trap(msg_receive_trap,-21,5)
197 kernel_trap(msg_rpc_trap,-22,6)
198 kernel_trap(host_self,-55,0)
199
200 #endif /* MACH_IPC_COMPAT */
201
202 #endif /* _MACH_SYSCALL_SW_H_ */
Cache object: aad6b7db1e2965c4bdf4a4c275017433
|