X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/316670eb35587141e969394ae8537d66b9211e80..7e41aa883dd258f888d0470250eead40a53ef1f5:/libsyscall/mach/mach_port.c diff --git a/libsyscall/mach/mach_port.c b/libsyscall/mach/mach_port.c index 954d45e56..428ada4f2 100644 --- a/libsyscall/mach/mach_port.c +++ b/libsyscall/mach/mach_port.c @@ -163,6 +163,26 @@ mach_port_mod_refs( return (rv); } +kern_return_t +mach_port_peek( + ipc_space_t task, + mach_port_name_t name, + mach_msg_trailer_type_t trailer_type, + mach_port_seqno_t *seqnop, + mach_msg_size_t *msg_sizep, + mach_msg_id_t *msg_idp, + mach_msg_trailer_info_t trailer_infop, + mach_msg_type_number_t *trailer_sizep) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_peek(task, name, trailer_type, + seqnop, msg_sizep, msg_idp, + trailer_infop, trailer_sizep); + + return (rv); +} + kern_return_t mach_port_set_mscount( ipc_space_t task, @@ -375,6 +395,18 @@ mach_port_space_info( return (rv); } +kern_return_t +mach_port_space_basic_info( + ipc_space_t task, + ipc_info_space_basic_t *space_basic_info) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_space_basic_info(task, space_basic_info); + + return (rv); +} + kern_return_t mach_port_dnrequest_info( ipc_space_t task, @@ -481,3 +513,74 @@ mach_port_kobject( return (rv); } + +kern_return_t +mach_port_construct( + ipc_space_t task, + mach_port_options_t *options, + mach_port_context_t context, + mach_port_name_t *name) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_construct_trap(task, options, (uint64_t) context, name); + + if (rv == MACH_SEND_INVALID_DEST) + rv = _kernelrpc_mach_port_construct(task, options, (uint64_t) context, name); + + return (rv); +} + +kern_return_t +mach_port_destruct( + ipc_space_t task, + mach_port_name_t name, + mach_port_delta_t srdelta, + mach_port_context_t guard) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_destruct_trap(task, name, srdelta, (uint64_t) guard); + + if (rv == MACH_SEND_INVALID_DEST) + rv = _kernelrpc_mach_port_destruct(task, name, srdelta, (uint64_t) guard); + + return (rv); + +} + +kern_return_t +mach_port_guard( + ipc_space_t task, + mach_port_name_t name, + mach_port_context_t guard, + boolean_t strict) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_guard_trap(task, name, (uint64_t) guard, strict); + + if (rv == MACH_SEND_INVALID_DEST) + rv = _kernelrpc_mach_port_guard(task, name, (uint64_t) guard, strict); + + return (rv); + +} + +kern_return_t +mach_port_unguard( + ipc_space_t task, + mach_port_name_t name, + mach_port_context_t guard) +{ + kern_return_t rv; + + rv = _kernelrpc_mach_port_unguard_trap(task, name, (uint64_t) guard); + + if (rv == MACH_SEND_INVALID_DEST) + rv = _kernelrpc_mach_port_unguard(task, name, (uint64_t) guard); + + return (rv); + +} +