1 <h2>mach_port_destroy
</h2>
4 <strong>Function
</strong> - Deallocate all port rights associated with specified name.
7 <strong>kern_return_t mach_port_destroy
</strong>
8 <strong>(ipc_space_t
</strong> <var>task
</var>,
9 <strong>mach_port_name_t
</strong> <var>name
</var><strong>);
</strong>
17 The task holding the right.
22 The task's name for the right.
26 The
<strong>mach_port_destroy
</strong> function de-allocates all rights
28 The name becomes immediately available for reuse.
31 <strong>mach_port_mod_refs
</strong> and
<strong>mach_port_deallocate
</strong> are
34 If
<var>name
</var> denotes a port set, then all members of the port set are implicitly
35 removed from the port set.
37 If
<var>name
</var> denotes a receive right that is a member of a port set,
39 implicitly removed from the port set. Remaining messages queued to the port
40 are destroyed and extant send and send-once rights turn into dead names. If
41 those send and send-once rights have dead-name requests registered, then
42 dead-name notifications are generated for them.
44 If
<var>name
</var> denotes a send-once right, then
45 the destruction of the send-once right
46 produces a send-once notification for the port.
48 If
<var>name
</var> denotes a send-once, send, and/or receive right, and
50 request registered, then a port-deleted notification is generated
52 dead-name notification).
55 This interface is machine word length specific because of the port name
57 <h3>RETURN VALUES
</h3>
60 <dt> <strong>KERN_INVALID_NAME
</strong>
62 The
<var>name
</var> parameter did not denote a right.
64 <h3>RELATED INFORMATION
</h3>
67 <a href=
"mach_port_allocate.html"><strong>mach_port_allocate
</strong></a>,
68 <a href=
"mach_port_allocate_name.html"><strong>mach_port_allocate_name
</strong></a>,
69 <a href=
"mach_port_mod_refs.html"><strong>mach_port_mod_refs
</strong></a>,
70 <a href=
"mach_port_deallocate.html"><strong>mach_port_deallocate
</strong></a>,
71 <a href=
"MP_request_notification.html"><strong>mach_port_request_notification
</strong></a>.