]>
Commit | Line | Data |
---|---|---|
9bccf70c | 1 | <h2>mach_port_destroy</h2>\r<hr>\r<p>\r<strong>Function</strong> - Deallocate all port rights associated with specified name.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t mach_port_destroy</strong>\r <strong>(ipc_space_t</strong> <var>task</var>,\r <strong>mach_port_name_t</strong> <var>name</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var> \r<dd>\r[in task send right]\rThe task holding the right.\r<p>\r<dt> <var>name</var> \r<dd>\r[in scalar]\rThe task's name for the right.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mach_port_destroy</strong> function de-allocates all rights\rdenoted by a name. \rThe name becomes immediately available for reuse. \r<p>\rFor most purposes, \r<strong>mach_port_mod_refs</strong> and <strong>mach_port_deallocate</strong> are\rpreferable.\r<p>\rIf <var>name</var> denotes a port set, then all members of the port set are implicitly\rremoved from the port set.\r<p>\rIf <var>name</var> denotes a receive right that is a member of a port set,\rthe receive right is \rimplicitly removed from the port set. Remaining messages queued to the port \rare destroyed and extant send and send-once rights turn into dead names. If \rthose send and send-once rights have dead-name requests registered, then\rdead-name notifications are generated for them. \r<p>\rIf <var>name</var> denotes a send-once right, then \rthe destruction of the send-once right \rproduces a send-once notification for the port. \r<p>\rIf <var>name</var> denotes a send-once, send, and/or receive right, and\rit has a dead-name \rrequest registered, then a port-deleted notification is generated\r(as opposed to a \rdead-name notification).\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the port name\rparameter.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_NAME</strong>\r<dd>\rThe <var>name</var> parameter did not denote a right.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>,\r<a href="mach_port_allocate_name.html"><strong>mach_port_allocate_name</strong></a>,\r<a href="mach_port_mod_refs.html"><strong>mach_port_mod_refs</strong></a>,\r<a href="mach_port_deallocate.html"><strong>mach_port_deallocate</strong></a>,\r<a href="MP_request_notification.html"><strong>mach_port_request_notification</strong></a>.\r |