]>
git.saurik.com Git - apple/libc.git/blob - ppc/sys/SYS.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
25 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
29 * Definition of the user side of the UNIX system call interface
32 * Errors are flagged by the location of the trap return (ie., which
33 * instruction is executed upon rfi):
35 * SC PC + 4: Error (typically branch to cerror())
39 * 18-Nov-92 Ben Fathi (benf@next.com)
42 * 9-Jan-92 Peter King (king@next.com)
46 #define KERNEL_PRIVATE 1
50 #import <architecture/ppc/asm_help.h>
51 #import <architecture/ppc/pseudo_inst.h>
52 #import <mach/ppc/exception.h>
53 #import <sys/syscall.h>
55 /* From rhapsody kernel mach/ppc/syscall_sw.h */
56 #define kernel_trap_args_0
57 #define kernel_trap_args_1
58 #define kernel_trap_args_2
59 #define kernel_trap_args_3
60 #define kernel_trap_args_4
61 #define kernel_trap_args_5
62 #define kernel_trap_args_6
63 #define kernel_trap_args_7
66 * simple_kernel_trap -- Mach system calls with 8 or less args
67 * Args are passed in a0 - a7, system call number in r0.
68 * Do a "sc" instruction to enter kernel.
70 #define simple_kernel_trap(trap_name, trap_number) \
71 .globl _##trap_name @\
78 #define kernel_trap_0(trap_name,trap_number) \
79 simple_kernel_trap(trap_name,trap_number)
81 #define kernel_trap_1(trap_name,trap_number) \
82 simple_kernel_trap(trap_name,trap_number)
84 #define kernel_trap_2(trap_name,trap_number) \
85 simple_kernel_trap(trap_name,trap_number)
87 #define kernel_trap_3(trap_name,trap_number) \
88 simple_kernel_trap(trap_name,trap_number)
90 #define kernel_trap_4(trap_name,trap_number) \
91 simple_kernel_trap(trap_name,trap_number)
93 #define kernel_trap_5(trap_name,trap_number) \
94 simple_kernel_trap(trap_name,trap_number)
96 #define kernel_trap_6(trap_name,trap_number) \
97 simple_kernel_trap(trap_name,trap_number)
99 #define kernel_trap_7(trap_name,trap_number) \
100 simple_kernel_trap(trap_name,trap_number)
102 #define kernel_trap_8(trap_name,trap_number) \
103 simple_kernel_trap(trap_name,trap_number)
105 #define kernel_trap_9(trap_name,trap_number) \
106 simple_kernel_trap(trap_name,trap_number)
108 /* End of rhapsody kernel mach/ppc/syscall_sw.h */
114 #define SYSCALL(name, nargs) \
117 kernel_trap_args_##nargs @\
122 1: BRANCH_EXTERN(cerror) @\
126 #define SYSCALL_NONAME(name, nargs) \
128 kernel_trap_args_##nargs @\
133 1: BRANCH_EXTERN(cerror) @\
137 #define PSEUDO(pseudo, name, nargs) \
139 SYSCALL_NONAME(name, nargs)
143 #import <mach/ppc/syscall_sw.h>
145 #if !defined(SYS_getdirentriesattr)
146 #define SYS_getdirentriesattr 222
149 #if !defined(SYS_semsys)
150 #define SYS_semsys 251
151 #define SYS_msgsys 252
152 #define SYS_shmsys 253
153 #define SYS_semctl 254
154 #define SYS_semget 255
155 #define SYS_semop 256
156 #define SYS_semconfig 257
157 #define SYS_msgctl 258
158 #define SYS_msgget 259
159 #define SYS_msgsnd 260
160 #define SYS_msgrcv 261
161 #define SYS_shmat 262
162 #define SYS_shmctl 263
163 #define SYS_shmdt 264
164 #define SYS_shmget 265