X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/21362eb3e66fd2c787aee132bce100a44d71a99c..593a1d5fd87cdf5b46dd5fcb84467b432cea0f91:/osfmk/mach/mach_traps.h diff --git a/osfmk/mach/mach_traps.h b/osfmk/mach/mach_traps.h index eb982c3d0..87c4df1f6 100644 --- a/osfmk/mach/mach_traps.h +++ b/osfmk/mach/mach_traps.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -202,6 +202,11 @@ extern kern_return_t task_for_pid( int pid, mach_port_name_t *t); +extern kern_return_t task_name_for_pid( + mach_port_name_t target_tport, + int pid, + mach_port_name_t *tn); + extern kern_return_t pid_for_task( mach_port_name_t t, int *x); @@ -223,13 +228,9 @@ extern kern_return_t map_fd( #ifdef XNU_KERNEL_PRIVATE /* Syscall data translations routines */ -#ifdef __ppc__ #define PAD_(t) (sizeof(uint64_t) <= sizeof(t) \ ? 0 : sizeof(uint64_t) - sizeof(t)) -#else -#define PAD_(t) (sizeof(register_t) <= sizeof(t) \ - ? 0 : sizeof(register_t) - sizeof(t)) -#endif +#define PAD_ARG_8 #if BYTE_ORDER == LITTLE_ENDIAN #define PADL_(t) 0 @@ -331,6 +332,7 @@ struct mach_msg_overwrite_trap_args { PAD_ARG_(mach_port_name_t, rcv_name); PAD_ARG_(mach_msg_timeout_t, timeout); PAD_ARG_(mach_port_name_t, notify); + PAD_ARG_8 PAD_ARG_(mach_vm_address_t, rcv_msg); /* Unused on mach_msg_trap */ }; extern mach_msg_return_t mach_msg_trap( @@ -412,6 +414,14 @@ struct task_for_pid_args { extern kern_return_t task_for_pid( struct task_for_pid_args *args); +struct task_name_for_pid_args { + PAD_ARG_(mach_port_name_t, target_tport); + PAD_ARG_(int, pid); + PAD_ARG_(user_addr_t, t); +}; +extern kern_return_t task_name_for_pid( + struct task_name_for_pid_args *args); + struct pid_for_task_args { PAD_ARG_(mach_port_name_t, t); PAD_ARG_(user_addr_t, pid); @@ -525,17 +535,6 @@ struct mk_timer_cancel_trap_args { extern kern_return_t mk_timer_cancel_trap( struct mk_timer_cancel_trap_args *args); -/* no user-level prototype for this one */ -struct mk_timebase_info_trap_args { - PAD_ARG_(uint32_t *, delta); - PAD_ARG_(uint32_t *, abs_to_ns_numer); - PAD_ARG_(uint32_t *, abs_to_ns_denom); - PAD_ARG_(uint32_t *, proc_to_abs_numer); - PAD_ARG_(uint32_t *, proc_to_abs_denom); -}; -extern void mk_timebase_info_trap( - struct mk_timebase_info_trap_args *args); - /* not published to LP64 clients yet */ struct iokit_user_client_trap_args { PAD_ARG_(void *, userClientRef); @@ -545,6 +544,7 @@ struct iokit_user_client_trap_args { PAD_ARG_(void *, p3); PAD_ARG_(void *, p4); PAD_ARG_(void *, p5); + PAD_ARG_8 PAD_ARG_(void *, p6); }; kern_return_t iokit_user_client_trap( @@ -554,6 +554,7 @@ kern_return_t iokit_user_client_trap( #undef PADL_ #undef PADR_ #undef PAD_ARG_ +#undef PAD_ARG_8 #endif /* XNU_KERNEL_PRIVATE */