X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8ad349bb6ed4a0be06e34c92be0d98b92e078db4..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/bsd/sys/sysent.h diff --git a/bsd/sys/sysent.h b/bsd/sys/sysent.h index 464da1ec2..b83a67c44 100644 --- a/bsd/sys/sysent.h +++ b/bsd/sys/sysent.h @@ -1,31 +1,29 @@ /* - * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved. + * Copyright (c) 2004-2007 Apple Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the - * License may not be used to create, or enable the creation or - * redistribution of, unlawful or unlicensed copies of an Apple operating - * system, or to circumvent, violate, or enable the circumvention or - * violation of, any terms of an Apple operating system software license - * agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and * limitations under the License. - * - * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #ifndef _SYS_SYSENT_H_ @@ -43,19 +41,29 @@ typedef int32_t sy_call_t(struct proc *, void *, int *); typedef void sy_munge_t(const void *, void *); -extern struct sysent { /* system call table */ +struct sysent { /* system call table */ int16_t sy_narg; /* number of args */ - int8_t sy_cancel; /* funnel type */ - int8_t sy_funnel; /* funnel type */ + int8_t sy_resv; /* reserved */ + int8_t sy_flags; /* flags */ sy_call_t *sy_call; /* implementing function */ - sy_munge_t *sy_arg_munge32; /* system call aguments munger for 32-bit process */ - sy_munge_t *sy_arg_munge64; /* system call aguments munger for 64-bit process */ + sy_munge_t *sy_arg_munge32; /* system call arguments munger for 32-bit process */ + sy_munge_t *sy_arg_munge64; /* system call arguments munger for 64-bit process */ int32_t sy_return_type; /* system call return types */ -} sysent[]; + uint16_t sy_arg_bytes; /* Total size of arguments in bytes for + * 32-bit system calls + */ +}; + +#ifndef __INIT_SYSENT_C__ +extern struct sysent sysent[]; +#endif /* __INIT_SYSENT_C__ */ + +extern int nsysent; +#define NUM_SYSENT 434 /* Current number of defined syscalls */ /* sy_funnel flags bits */ -#define FUNNEL_MASK 0x00ff -#define UNSAFE_64BIT 0x0100 +#define FUNNEL_MASK 0x07f +#define UNSAFE_64BIT 0x080 /* * Valid values for sy_cancel @@ -74,8 +82,7 @@ extern struct sysent { /* system call table */ #define _SYSCALL_RET_ADDR_T 4 #define _SYSCALL_RET_SIZE_T 5 #define _SYSCALL_RET_SSIZE_T 6 - -extern int nsysent; +#define _SYSCALL_RET_UINT64_T 7 #endif /* __APPLE_API_PRIVATE */ #endif /* KERNEL_PRIVATE */