]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
91447636 | 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. |
1c79356b | 3 | * |
8ad349bb | 4 | * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ |
1c79356b | 5 | * |
8ad349bb A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the | |
10 | * License may not be used to create, or enable the creation or | |
11 | * redistribution of, unlawful or unlicensed copies of an Apple operating | |
12 | * system, or to circumvent, violate, or enable the circumvention or | |
13 | * violation of, any terms of an Apple operating system software license | |
14 | * agreement. | |
15 | * | |
16 | * Please obtain a copy of the License at | |
17 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
18 | * file. | |
19 | * | |
20 | * The Original Code and all software distributed under the License are | |
21 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
22 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
23 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
24 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
25 | * Please see the License for the specific language governing rights and | |
26 | * limitations under the License. | |
27 | * | |
28 | * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ | |
1c79356b A |
29 | */ |
30 | /* | |
31 | * @OSF_COPYRIGHT@ | |
32 | */ | |
33 | /* | |
34 | * Mach Operating System | |
35 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | |
36 | * All Rights Reserved. | |
37 | * | |
38 | * Permission to use, copy, modify and distribute this software and its | |
39 | * documentation is hereby granted, provided that both the copyright | |
40 | * notice and this permission notice appear in all copies of the | |
41 | * software, derivative works or modified versions, and any portions | |
42 | * thereof, and that both notices appear in supporting documentation. | |
43 | * | |
44 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
45 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
46 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
47 | * | |
48 | * Carnegie Mellon requests users of this software to return to | |
49 | * | |
50 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
51 | * School of Computer Science | |
52 | * Carnegie Mellon University | |
53 | * Pittsburgh PA 15213-3890 | |
54 | * | |
55 | * any improvements or extensions that they make and grant Carnegie Mellon | |
56 | * the rights to redistribute these changes. | |
57 | */ | |
58 | ||
91447636 A |
59 | #ifdef PRIVATE |
60 | ||
1c79356b A |
61 | #ifndef _MACH_SYSCALL_SW_H_ |
62 | #define _MACH_SYSCALL_SW_H_ | |
63 | ||
64 | /* | |
65 | * The machine-dependent "syscall_sw.h" file should | |
66 | * define a macro for | |
67 | * kernel_trap(trap_name, trap_number, arg_count) | |
68 | * which will expand into assembly code for the | |
69 | * trap. | |
70 | * | |
71 | * N.B.: When adding calls, do not put spaces in the macros. | |
72 | */ | |
73 | ||
74 | #include <mach/machine/syscall_sw.h> | |
75 | ||
76 | /* | |
77 | * These trap numbers should be taken from the | |
78 | * table in <kern/syscall_sw.c>. | |
79 | */ | |
80 | ||
81 | kernel_trap(mach_reply_port,-26,0) | |
82 | kernel_trap(thread_self_trap,-27,0) | |
83 | kernel_trap(task_self_trap,-28,0) | |
84 | kernel_trap(host_self_trap,-29,0) | |
91447636 | 85 | |
9bccf70c | 86 | kernel_trap(mach_msg_trap,-31,7) |
1c79356b A |
87 | kernel_trap(mach_msg_overwrite_trap,-32,9) |
88 | kernel_trap(semaphore_signal_trap, -33, 1) | |
89 | kernel_trap(semaphore_signal_all_trap, -34, 1) | |
90 | kernel_trap(semaphore_signal_thread_trap, -35, 2) | |
91 | kernel_trap(semaphore_wait_trap,-36,1) | |
92 | kernel_trap(semaphore_wait_signal_trap,-37,2) | |
93 | kernel_trap(semaphore_timedwait_trap,-38,3) | |
94 | kernel_trap(semaphore_timedwait_signal_trap,-39,4) | |
95 | ||
91447636 | 96 | #if !defined(__LP64__) |
1c79356b A |
97 | kernel_trap(init_process,-41,0) |
98 | kernel_trap(map_fd,-43,5) | |
91447636 A |
99 | #endif /* __LP64__ */ |
100 | ||
1c79356b A |
101 | kernel_trap(task_for_pid,-45,3) |
102 | kernel_trap(pid_for_task,-46,2) | |
91447636 A |
103 | |
104 | #if !defined(__LP64__) | |
1c79356b A |
105 | kernel_trap(macx_swapon,-48, 4) |
106 | kernel_trap(macx_swapoff,-49, 2) | |
107 | kernel_trap(macx_triggers,-51, 4) | |
55e303ae A |
108 | kernel_trap(macx_backing_store_suspend,-52, 1) |
109 | kernel_trap(macx_backing_store_recovery,-53, 1) | |
91447636 | 110 | #endif /* __LP64__ */ |
1c79356b | 111 | |
91447636 A |
112 | /* These are currently used by pthreads even on LP64 */ |
113 | /* But as soon as that is fixed - they will go away there */ | |
1c79356b A |
114 | kernel_trap(swtch_pri,-59,1) |
115 | kernel_trap(swtch,-60,0) | |
91447636 | 116 | |
1c79356b A |
117 | kernel_trap(syscall_thread_switch,-61,3) |
118 | kernel_trap(clock_sleep_trap,-62,5) | |
119 | ||
120 | kernel_trap(mach_timebase_info,-89,1) | |
91447636 A |
121 | |
122 | #if defined(__LP64__) | |
123 | /* unit64_t arguments passed in one register in LP64 */ | |
124 | kernel_trap(mach_wait_until,-90,1) | |
125 | #else /* __LP64__ */ | |
1c79356b | 126 | kernel_trap(mach_wait_until,-90,2) |
91447636 A |
127 | #endif /* __LP64__ */ |
128 | ||
1c79356b A |
129 | kernel_trap(mk_timer_create,-91,0) |
130 | kernel_trap(mk_timer_destroy,-92,1) | |
91447636 A |
131 | |
132 | #if defined(__LP64__) | |
133 | /* unit64_t arguments passed in one register in LP64 */ | |
134 | kernel_trap(mk_timer_arm,-93,2) | |
135 | #else /* __LP64__ */ | |
1c79356b | 136 | kernel_trap(mk_timer_arm,-93,3) |
91447636 A |
137 | #endif /* __LP64__ */ |
138 | ||
1c79356b A |
139 | kernel_trap(mk_timer_cancel,-94,2) |
140 | ||
91447636 | 141 | #if !defined(__LP64__) |
1c79356b | 142 | kernel_trap(MKGetTimeBaseInfo,-95,5) |
91447636 | 143 | #endif /* __LP64__ */ |
1c79356b A |
144 | |
145 | #endif /* _MACH_SYSCALL_SW_H_ */ | |
91447636 A |
146 | |
147 | #endif /* PRIVATE */ |