]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/sysent.h
464da1ec26222331e913e82c74bfaacf7115d446
2 * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 #ifndef _SYS_SYSENT_H_
32 #define _SYS_SYSENT_H_
34 #include <sys/appleapiopts.h>
35 #include <sys/cdefs.h>
37 #include <sys/types.h>
41 #ifdef __APPLE_API_PRIVATE
43 typedef int32_t sy_call_t(struct proc
*, void *, int *);
44 typedef void sy_munge_t(const void *, void *);
46 extern struct sysent
{ /* system call table */
47 int16_t sy_narg
; /* number of args */
48 int8_t sy_cancel
; /* funnel type */
49 int8_t sy_funnel
; /* funnel type */
50 sy_call_t
*sy_call
; /* implementing function */
51 sy_munge_t
*sy_arg_munge32
; /* system call aguments munger for 32-bit process */
52 sy_munge_t
*sy_arg_munge64
; /* system call aguments munger for 64-bit process */
53 int32_t sy_return_type
; /* system call return types */
56 /* sy_funnel flags bits */
57 #define FUNNEL_MASK 0x00ff
58 #define UNSAFE_64BIT 0x0100
61 * Valid values for sy_cancel
63 #define _SYSCALL_CANCEL_NONE 0 /* Not a cancellation point */
64 #define _SYSCALL_CANCEL_PRE 1 /* Canbe cancelled on entry itself */
65 #define _SYSCALL_CANCEL_POST 2 /* Can only be cancelled after syscall is run */
68 * Valid values for sy_return_type
70 #define _SYSCALL_RET_NONE 0
71 #define _SYSCALL_RET_INT_T 1
72 #define _SYSCALL_RET_UINT_T 2
73 #define _SYSCALL_RET_OFF_T 3
74 #define _SYSCALL_RET_ADDR_T 4
75 #define _SYSCALL_RET_SIZE_T 5
76 #define _SYSCALL_RET_SSIZE_T 6
80 #endif /* __APPLE_API_PRIVATE */
81 #endif /* KERNEL_PRIVATE */
83 #endif /* !_SYS_SYSENT_H_ */