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