X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..e2d2fc5c71f7d145cba7267989251af45e3bb5ba:/osfmk/kern/syscall_sw.h diff --git a/osfmk/kern/syscall_sw.h b/osfmk/kern/syscall_sw.h index 4aab31696..d186546d5 100644 --- a/osfmk/kern/syscall_sw.h +++ b/osfmk/kern/syscall_sw.h @@ -71,21 +71,13 @@ typedef void mach_munge_t(const void *, void *); typedef struct { int mach_trap_arg_count; int (*mach_trap_function)(void); -#if defined(__i386__) - boolean_t mach_trap_stack; -#elif defined(__arm__) - /* no space */ -#else +#if 0 /* no active architectures use mungers for mach traps */ mach_munge_t *mach_trap_arg_munge32; /* system call arguments for 32-bit */ mach_munge_t *mach_trap_arg_munge64; /* system call arguments for 64-bit */ #endif -#if !MACH_ASSERT -#if !defined(__arm__) - int mach_trap_unused; -#endif -#else +#if MACH_ASSERT const char* mach_trap_name; -#endif /* !MACH_ASSERT */ +#endif /* MACH_ASSERT */ } mach_trap_t; #define MACH_TRAP_TABLE_COUNT 128 @@ -94,31 +86,16 @@ typedef struct { extern mach_trap_t mach_trap_table[]; extern int mach_trap_count; -#if defined(__i386__) -#if !MACH_ASSERT -#define MACH_TRAP(name, arg_count, munge32, munge64) \ - { (arg_count), (int (*)(void)) (name), FALSE, 0 } -#else -#define MACH_TRAP(name, arg_count, munge32, munge64) \ - { (arg_count), (int (*)(void)) (name), FALSE, #name } -#endif /* !MACH_ASSERT */ -#elif defined(__arm__) +#if defined(__i386__) || defined(__x86_64__) #if !MACH_ASSERT #define MACH_TRAP(name, arg_count, munge32, munge64) \ - { (arg_count), (int (*)(void)) (name) } + { (arg_count), (int (*)(void)) (name) } #else #define MACH_TRAP(name, arg_count, munge32, munge64) \ { (arg_count), (int (*)(void)) (name), #name } #endif /* !MACH_ASSERT */ -#else /* !defined(__i386__) */ -#if !MACH_ASSERT -#define MACH_TRAP(name, arg_count, munge32, munge64) \ - { (arg_count), (int (*)(void)) (name), (munge32), (munge64), 0 } -#else -#define MACH_TRAP(name, arg_count, munge32, munge64) \ - { (arg_count), (int (*)(void)) (name), (munge32), (munge64), #name } -#endif /* !MACH_ASSERT */ - -#endif /* !defined(__i386__) */ +#else /* !defined(__i386__) && !defined(__x86_64__) && !defined(__arm__) */ +#error Unsupported architecture +#endif /* !defined(__i386__) && !defined(__x86_64__) && !defined(__arm__) */ #endif /* _KERN_SYSCALL_SW_H_ */