X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..3e170ce000f1506b7b5d2c5c7faec85ceabb573d:/osfmk/mach/mach_traps.h diff --git a/osfmk/mach/mach_traps.h b/osfmk/mach/mach_traps.h index cfff70c09..c33a308f4 100644 --- a/osfmk/mach/mach_traps.h +++ b/osfmk/mach/mach_traps.h @@ -304,18 +304,6 @@ extern kern_return_t pid_for_task( mach_port_name_t t, int *x); -#if !defined(__LP64__) && !defined(__arm__) -/* these should go away altogether - so no 64 legacy please */ - -extern kern_return_t map_fd( - int fd, - vm_offset_t offset, - vm_offset_t *va, - boolean_t findspace, - vm_size_t size); - -#endif /* !defined(__LP64__) && !defined(__arm__) */ - #else /* KERNEL */ #ifdef XNU_KERNEL_PRIVATE @@ -325,9 +313,15 @@ extern kern_return_t map_fd( * The kernel may support multiple userspace ABIs, and must use * argument structures with elements large enough for any of them. */ +#if CONFIG_REQUIRES_U32_MUNGING #define PAD_(t) (sizeof(uint64_t) <= sizeof(t) \ ? 0 : sizeof(uint64_t) - sizeof(t)) #define PAD_ARG_8 +#else +#define PAD_(t) (sizeof(uint32_t) <= sizeof(t) \ + ? 0 : sizeof(uint32_t) - sizeof(t)) +#define PAD_ARG_8 char arg8_pad_[sizeof(uint32_t)]; +#endif #if BYTE_ORDER == LITTLE_ENDIAN #define PADL_(t) 0 @@ -347,33 +341,6 @@ extern kern_return_t map_fd( * traps, without calling out to the BSD system call mungers. */ -#if 0 /* no active architectures use this */ -void munge_w(const void *, void *); -void munge_ww(const void *, void *); -void munge_www(const void *, void *); -void munge_wwww(const void *, void *); -void munge_wwwww(const void *, void *); -void munge_wwwwww(const void *, void *); -void munge_wwwwwww(const void *, void *); -void munge_wwwwwwww(const void *, void *); -void munge_d(const void *, void *); -void munge_dd(const void *, void *); -void munge_ddd(const void *, void *); -void munge_dddd(const void *, void *); -void munge_ddddd(const void *, void *); -void munge_dddddd(const void *, void *); -void munge_ddddddd(const void *, void *); -void munge_dddddddd(const void *, void *); -void munge_l(const void *, void *); -void munge_lw(const void *, void *); -void munge_lwww(const void *, void *); -void munge_wl(const void *, void *); -void munge_wlw(const void *, void *); -void munge_wwwl(const void *, void *); -void munge_wwwwl(const void *, void *); -void munge_wwwwwl(const void *, void *); -#endif /* 0 */ - struct kern_invalid_args { int32_t dummy; }; @@ -469,16 +436,6 @@ struct semaphore_timedwait_signal_trap_args { extern kern_return_t semaphore_timedwait_signal_trap( struct semaphore_timedwait_signal_trap_args *args); -struct map_fd_args { - PAD_ARG_(int, fd); - PAD_ARG_(vm_offset_t, offset); - PAD_ARG_(vm_offset_t *, va); - PAD_ARG_(boolean_t, findspace); - PAD_ARG_(vm_size_t, size); -}; -extern kern_return_t map_fd( - struct map_fd_args *args); - struct task_for_pid_args { PAD_ARG_(mach_port_name_t, target_tport); PAD_ARG_(int, pid);