X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..4d15aeb193b2c68f1d38666c317f8d3734f5f083:/osfmk/ipc/ipc_right.h diff --git a/osfmk/ipc/ipc_right.h b/osfmk/ipc/ipc_right.h index b7affe7b3..a3d4af17e 100644 --- a/osfmk/ipc/ipc_right.h +++ b/osfmk/ipc/ipc_right.h @@ -95,24 +95,25 @@ extern boolean_t ipc_right_reverse( mach_port_name_t *namep, ipc_entry_t *entryp); -/* Make a dead-name request, returning the registered send-once right */ -extern kern_return_t ipc_right_dnrequest( +/* Make a notification request, returning the previous send-once right */ +extern kern_return_t ipc_right_request_alloc( ipc_space_t space, mach_port_name_t name, boolean_t immediate, + boolean_t send_possible, ipc_port_t notify, ipc_port_t *previousp); -/* Cancel a dead-name request and return the send-once right */ -extern ipc_port_t ipc_right_dncancel( +/* Cancel a notification request and return the send-once right */ +extern ipc_port_t ipc_right_request_cancel( ipc_space_t space, ipc_port_t port, mach_port_name_t name, ipc_entry_t entry); -#define ipc_right_dncancel_macro(space, port, name, entry) \ - ((entry->ie_request == 0) ? IP_NULL : \ - ipc_right_dncancel((space), (port), (name), (entry))) +#define ipc_right_request_cancel_macro(space, port, name, entry) \ + ((entry->ie_request == IE_REQ_NONE) ? IP_NULL : \ + ipc_right_request_cancel((space), (port), (name), (entry))) /* Check if an entry is being used */ extern boolean_t ipc_right_inuse( @@ -128,7 +129,7 @@ extern boolean_t ipc_right_check( ipc_entry_t entry); /* Clean up an entry in a dead space */ -extern void ipc_right_clean( +extern void ipc_right_terminate( ipc_space_t space, mach_port_name_t name, ipc_entry_t entry); @@ -137,7 +138,9 @@ extern void ipc_right_clean( extern kern_return_t ipc_right_destroy( ipc_space_t space, mach_port_name_t name, - ipc_entry_t entry); + ipc_entry_t entry, + boolean_t check_guard, + uint64_t guard); /* Release a send/send-once/dead-name user reference */ extern kern_return_t ipc_right_dealloc( @@ -153,6 +156,14 @@ extern kern_return_t ipc_right_delta( mach_port_right_t right, mach_port_delta_t delta); +/* Destroy a receive right; Modify ref count for send rights */ +extern kern_return_t ipc_right_destruct( + ipc_space_t space, + mach_port_name_t name, + ipc_entry_t entry, + mach_port_delta_t srdelta, + uint64_t guard); + /* Retrieve information about a right */ extern kern_return_t ipc_right_info( ipc_space_t space, @@ -176,7 +187,9 @@ extern kern_return_t ipc_right_copyin( mach_msg_type_name_t msgt_name, boolean_t deadok, ipc_object_t *objectp, - ipc_port_t *sorightp); + ipc_port_t *sorightp, + ipc_port_t *releasep, + int *assertcntp); /* Undo the effects of an ipc_right_copyin */ extern void ipc_right_copyin_undo( @@ -187,13 +200,16 @@ extern void ipc_right_copyin_undo( ipc_object_t object, ipc_port_t soright); -/* Copyin two send rights from a space */ +/* Copyin a pair of dispositions from a space */ extern kern_return_t ipc_right_copyin_two( ipc_space_t space, mach_port_name_t name, ipc_entry_t entry, + mach_msg_type_name_t msgt_one, + mach_msg_type_name_t msgt_two, ipc_object_t *objectp, - ipc_port_t *sorightp); + ipc_port_t *sorightp, + ipc_port_t *releasep); /* Copyout a capability to a space */ extern kern_return_t ipc_right_copyout(