]>
git.saurik.com Git - apple/xnu.git/blob - bsd/sys/sysent.h
2 * Copyright (c) 2004 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@
23 #ifndef _SYS_SYSENT_H_
24 #define _SYS_SYSENT_H_
26 #include <sys/appleapiopts.h>
27 #include <sys/cdefs.h>
29 #include <sys/types.h>
33 #ifdef __APPLE_API_PRIVATE
35 typedef int32_t sy_call_t(struct proc
*, void *, int *);
36 typedef void sy_munge_t(const void *, void *);
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 */
48 /* sy_funnel flags bits */
49 #define FUNNEL_MASK 0x00ff
50 #define UNSAFE_64BIT 0x0100
53 * Valid values for sy_cancel
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 */
60 * Valid values for sy_return_type
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
72 #endif /* __APPLE_API_PRIVATE */
73 #endif /* KERNEL_PRIVATE */
75 #endif /* !_SYS_SYSENT_H_ */