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