]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/syscall_sw.h
xnu-792.12.6.tar.gz
[apple/xnu.git] / osfmk / mach / syscall_sw.h
CommitLineData
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
81kernel_trap(mach_reply_port,-26,0)
82kernel_trap(thread_self_trap,-27,0)
83kernel_trap(task_self_trap,-28,0)
84kernel_trap(host_self_trap,-29,0)
91447636 85
9bccf70c 86kernel_trap(mach_msg_trap,-31,7)
1c79356b
A
87kernel_trap(mach_msg_overwrite_trap,-32,9)
88kernel_trap(semaphore_signal_trap, -33, 1)
89kernel_trap(semaphore_signal_all_trap, -34, 1)
90kernel_trap(semaphore_signal_thread_trap, -35, 2)
91kernel_trap(semaphore_wait_trap,-36,1)
92kernel_trap(semaphore_wait_signal_trap,-37,2)
93kernel_trap(semaphore_timedwait_trap,-38,3)
94kernel_trap(semaphore_timedwait_signal_trap,-39,4)
95
91447636 96#if !defined(__LP64__)
1c79356b
A
97kernel_trap(init_process,-41,0)
98kernel_trap(map_fd,-43,5)
91447636
A
99#endif /* __LP64__ */
100
1c79356b
A
101kernel_trap(task_for_pid,-45,3)
102kernel_trap(pid_for_task,-46,2)
91447636
A
103
104#if !defined(__LP64__)
1c79356b
A
105kernel_trap(macx_swapon,-48, 4)
106kernel_trap(macx_swapoff,-49, 2)
107kernel_trap(macx_triggers,-51, 4)
55e303ae
A
108kernel_trap(macx_backing_store_suspend,-52, 1)
109kernel_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
114kernel_trap(swtch_pri,-59,1)
115kernel_trap(swtch,-60,0)
91447636 116
1c79356b
A
117kernel_trap(syscall_thread_switch,-61,3)
118kernel_trap(clock_sleep_trap,-62,5)
119
120kernel_trap(mach_timebase_info,-89,1)
91447636
A
121
122#if defined(__LP64__)
123/* unit64_t arguments passed in one register in LP64 */
124kernel_trap(mach_wait_until,-90,1)
125#else /* __LP64__ */
1c79356b 126kernel_trap(mach_wait_until,-90,2)
91447636
A
127#endif /* __LP64__ */
128
1c79356b
A
129kernel_trap(mk_timer_create,-91,0)
130kernel_trap(mk_timer_destroy,-92,1)
91447636
A
131
132#if defined(__LP64__)
133/* unit64_t arguments passed in one register in LP64 */
134kernel_trap(mk_timer_arm,-93,2)
135#else /* __LP64__ */
1c79356b 136kernel_trap(mk_timer_arm,-93,3)
91447636
A
137#endif /* __LP64__ */
138
1c79356b
A
139kernel_trap(mk_timer_cancel,-94,2)
140
91447636 141#if !defined(__LP64__)
1c79356b 142kernel_trap(MKGetTimeBaseInfo,-95,5)
91447636 143#endif /* __LP64__ */
1c79356b
A
144
145#endif /* _MACH_SYSCALL_SW_H_ */
91447636
A
146
147#endif /* PRIVATE */