]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/sysent.h
xnu-3789.1.32.tar.gz
[apple/xnu.git] / bsd / sys / sysent.h
index 87fbc5c88ccce1127bccb17c0f3f7f2f2a6e6218..8182994d33775aeb1835a8ec69fdd9b51647656e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2004-2014 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
 
 #include <sys/appleapiopts.h>
 #include <sys/cdefs.h>
-#ifdef __ppc__
-#include <sys/types.h>
-#endif
 
 #ifdef KERNEL_PRIVATE
 #ifdef __APPLE_API_PRIVATE
 
 typedef        int32_t sy_call_t(struct proc *, void *, int *);
-typedef        void    sy_munge_t(const void *, void *);
+#if CONFIG_REQUIRES_U32_MUNGING
+typedef        void    sy_munge_t(void *);
+#endif
 
-extern struct sysent {         /* system call table */
-       int16_t         sy_narg;        /* number of args */
-       int8_t          sy_cancel;      /* funnel type */
-       int8_t          sy_funnel;      /* funnel type */
+struct sysent {                /* system call table */
        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 */
+#if CONFIG_REQUIRES_U32_MUNGING || (__arm__ && (__BIGGEST_ALIGNMENT__ > 4))
+       sy_munge_t      *sy_arg_munge32; /* system call arguments munger for 32-bit process */
+#endif
        int32_t         sy_return_type; /* system call return types */
-} sysent[];
+       int16_t         sy_narg;        /* number of args */
+       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__ */
 
-/* sy_funnel flags bits */
-#define FUNNEL_MASK    0x00ff
-#define        UNSAFE_64BIT    0x0100
+extern unsigned int nsysent;
 
 /* 
  * Valid values for sy_cancel
@@ -72,8 +75,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 */