]> git.saurik.com Git - apple/libc.git/blame - i386/sys/SYS.h
Libc-339.tar.gz
[apple/libc.git] / i386 / sys / SYS.h
CommitLineData
e9ce8d39
A
1/*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
59e0d9fe
A
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
e9ce8d39
A
38/*
39 * Headers
40 */
41#include <sys/syscall.h>
42#include <architecture/i386/asm_help.h>
43#include <mach/i386/syscall_sw.h>
44
45
46#define UNIX_SYSCALL_TRAP lcall $0x2b, $0
47#define MACHDEP_SYSCALL_TRAP lcall $0x7, $0
48
49
50#define UNIX_SYSCALL(name, nargs) \
51 .globl cerror ;\
52LEAF(_##name, 0) ;\
5b2abdfb 53 movl $ SYS_##name, %eax ;\
e9ce8d39
A
54 UNIX_SYSCALL_TRAP ;\
55 jnb 2f ;\
56 BRANCH_EXTERN(cerror) ;\
572:
58
59#define UNIX_SYSCALL_NONAME(name, nargs) \
60 .globl cerror ;\
5b2abdfb 61 movl $ SYS_##name, %eax ;\
e9ce8d39
A
62 UNIX_SYSCALL_TRAP ;\
63 jnb 2f ;\
64 BRANCH_EXTERN(cerror) ;\
652:
66
67#define PSEUDO(pseudo, name, nargs) \
68LEAF(_##pseudo, 0) ;\
69 UNIX_SYSCALL_NONAME(name, nargs)
70
71#if !defined(SYS_getdirentriesattr)
72#define SYS_getdirentriesattr 222
73#endif
74
75#if !defined(SYS_semsys)
76#define SYS_semsys 251
77#define SYS_msgsys 252
78#define SYS_shmsys 253
79#define SYS_semctl 254
80#define SYS_semget 255
81#define SYS_semop 256
82#define SYS_semconfig 257
83#define SYS_msgctl 258
84#define SYS_msgget 259
85#define SYS_msgsnd 260
86#define SYS_msgrcv 261
87#define SYS_shmat 262
88#define SYS_shmctl 263
89#define SYS_shmdt 264
90#define SYS_shmget 265
91#endif
92