/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
*
- * @APPLE_LICENSE_HEADER_START@
- *
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* Please see the License for the specific language governing rights and
* limitations under the License.
*
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/*
* @OSF_COPYRIGHT@
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(
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);
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(
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,
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(
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(