]>
Commit | Line | Data |
---|---|---|
e9ce8d39 A |
1 | /* |
2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
734aad71 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
e9ce8d39 | 7 | * |
734aad71 A |
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 | |
13 | * file. | |
14 | * | |
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 | |
e9ce8d39 A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
734aad71 A |
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. | |
e9ce8d39 A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved | |
27 | * | |
28 | * File: SYS.h | |
29 | * | |
30 | * Definition of the user side of the UNIX system call interface | |
31 | * for i386. | |
32 | * | |
33 | * HISTORY | |
34 | * 12-3-92 Bruce Martin (Bruce_Martin@next.com) | |
35 | * Created. | |
36 | */ | |
37 | ||
38 | #define KERNEL_PRIVATE 1 | |
39 | /* | |
40 | * Headers | |
41 | */ | |
42 | #include <sys/syscall.h> | |
43 | #include <architecture/i386/asm_help.h> | |
44 | #include <mach/i386/syscall_sw.h> | |
45 | ||
46 | ||
47 | #define UNIX_SYSCALL_TRAP lcall $0x2b, $0 | |
48 | #define MACHDEP_SYSCALL_TRAP lcall $0x7, $0 | |
49 | ||
50 | ||
51 | #define UNIX_SYSCALL(name, nargs) \ | |
52 | .globl cerror ;\ | |
53 | LEAF(_##name, 0) ;\ | |
5b2abdfb | 54 | movl $ SYS_##name, %eax ;\ |
e9ce8d39 A |
55 | UNIX_SYSCALL_TRAP ;\ |
56 | jnb 2f ;\ | |
57 | BRANCH_EXTERN(cerror) ;\ | |
58 | 2: | |
59 | ||
60 | #define UNIX_SYSCALL_NONAME(name, nargs) \ | |
61 | .globl cerror ;\ | |
5b2abdfb | 62 | movl $ SYS_##name, %eax ;\ |
e9ce8d39 A |
63 | UNIX_SYSCALL_TRAP ;\ |
64 | jnb 2f ;\ | |
65 | BRANCH_EXTERN(cerror) ;\ | |
66 | 2: | |
67 | ||
68 | #define PSEUDO(pseudo, name, nargs) \ | |
69 | LEAF(_##pseudo, 0) ;\ | |
70 | UNIX_SYSCALL_NONAME(name, nargs) | |
71 | ||
72 | #if !defined(SYS_getdirentriesattr) | |
73 | #define SYS_getdirentriesattr 222 | |
74 | #endif | |
75 | ||
76 | #if !defined(SYS_semsys) | |
77 | #define SYS_semsys 251 | |
78 | #define SYS_msgsys 252 | |
79 | #define SYS_shmsys 253 | |
80 | #define SYS_semctl 254 | |
81 | #define SYS_semget 255 | |
82 | #define SYS_semop 256 | |
83 | #define SYS_semconfig 257 | |
84 | #define SYS_msgctl 258 | |
85 | #define SYS_msgget 259 | |
86 | #define SYS_msgsnd 260 | |
87 | #define SYS_msgrcv 261 | |
88 | #define SYS_shmat 262 | |
89 | #define SYS_shmctl 263 | |
90 | #define SYS_shmdt 264 | |
91 | #define SYS_shmget 265 | |
92 | #endif | |
93 |