]>
Commit | Line | Data |
---|---|---|
91447636 A |
1 | /* |
2 | * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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. | |
11 | * | |
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 | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | ||
23 | #ifndef _SYS_SYSENT_H_ | |
24 | #define _SYS_SYSENT_H_ | |
25 | ||
26 | #include <sys/appleapiopts.h> | |
27 | #include <sys/cdefs.h> | |
28 | #ifdef __ppc__ | |
29 | #include <sys/types.h> | |
30 | #endif | |
31 | ||
32 | #ifdef KERNEL_PRIVATE | |
33 | #ifdef __APPLE_API_PRIVATE | |
34 | ||
35 | typedef int32_t sy_call_t(struct proc *, void *, int *); | |
36 | typedef void sy_munge_t(const void *, void *); | |
37 | ||
38 | extern struct sysent { /* system call table */ | |
39 | int16_t sy_narg; /* number of args */ | |
40 | int8_t sy_cancel; /* funnel type */ | |
41 | int8_t sy_funnel; /* funnel type */ | |
42 | sy_call_t *sy_call; /* implementing function */ | |
43 | sy_munge_t *sy_arg_munge32; /* system call aguments munger for 32-bit process */ | |
44 | sy_munge_t *sy_arg_munge64; /* system call aguments munger for 64-bit process */ | |
45 | int32_t sy_return_type; /* system call return types */ | |
46 | } sysent[]; | |
47 | ||
48 | /* sy_funnel flags bits */ | |
49 | #define FUNNEL_MASK 0x00ff | |
50 | #define UNSAFE_64BIT 0x0100 | |
51 | ||
52 | /* | |
53 | * Valid values for sy_cancel | |
54 | */ | |
55 | #define _SYSCALL_CANCEL_NONE 0 /* Not a cancellation point */ | |
56 | #define _SYSCALL_CANCEL_PRE 1 /* Canbe cancelled on entry itself */ | |
57 | #define _SYSCALL_CANCEL_POST 2 /* Can only be cancelled after syscall is run */ | |
58 | ||
59 | /* | |
60 | * Valid values for sy_return_type | |
61 | */ | |
62 | #define _SYSCALL_RET_NONE 0 | |
63 | #define _SYSCALL_RET_INT_T 1 | |
64 | #define _SYSCALL_RET_UINT_T 2 | |
65 | #define _SYSCALL_RET_OFF_T 3 | |
66 | #define _SYSCALL_RET_ADDR_T 4 | |
67 | #define _SYSCALL_RET_SIZE_T 5 | |
68 | #define _SYSCALL_RET_SSIZE_T 6 | |
69 | ||
70 | extern int nsysent; | |
71 | ||
72 | #endif /* __APPLE_API_PRIVATE */ | |
73 | #endif /* KERNEL_PRIVATE */ | |
74 | ||
75 | #endif /* !_SYS_SYSENT_H_ */ |