]>
Commit | Line | Data |
---|---|---|
9bccf70c | 1 | <h2>mach_port_extract_right</h2>\r<hr>\r<p>\r<strong>Function</strong> - Remove the specified right from the target task and return it to the caller.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t mach_port_extract_right</strong>\r <strong>(ipc_space_t</strong> <var>task</var>,\r <strong>mach_port_name_t</strong> <var>name</var>,\r <strong>mach_msg_type_name_t</strong> <var>desired_type</var>,\r <strong>mach_port_poly_t</strong> <var>*right</var>,\r <strong>mach_msg_type_name_</strong> <var>*acquired_type</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 port right.\r<p>\r<dt> <var>name</var> \r<dd>\r[in scalar]\rThe task's name for the port right.\r<p>\r<dt> <var>desired_type</var> \r<dd>\r[in scalar]\rIPC type, specifying how the right should be extracted.\r<p>\r<dt> <var>right</var> \r<dd>\r[out random right]\rThe extracted right.\r<p>\r<dt> <var>acquired_type</var> \r<dd>\r[out scalar]\rThe type of the extracted right.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mach_port_extract_right</strong> function extracts a port\rright from the target \rtask and returns it to the caller as if the task sent the right\rvoluntarily, using\r<var>desired_type</var> as the disposition for the right. See <strong>mach_msg</strong>.\r<p>\rThe returned value of <var>acquired_type</var> will be\r<strong>MACH_MSG_TYPE_PORT_SEND</strong> if a send right is extracted, \r<strong>MACH_MSG_TYPE_PORT_RECEIVE</strong> if a \rreceive right is extracted, and <strong>MACH_MSG_TYPE_PORT_SEND_ONCE</strong> if a \rsend-once right is extracted.\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>\r<var>name</var> did not denote a right.\r<p>\r<dt> <strong>KERN_INVALID_RIGHT</strong>\r<dd>\r<var>name</var> denoted an invalid right.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="mach_port_insert_right.html"><strong>mach_port_insert_right</strong></a>,\r<a href="mach_msg.html"><strong>mach_msg</strong></a>.\r |