1 <h2>mach_port_extract_right
</h2>
4 <strong>Function
</strong> - Remove the specified right from the target task and return it to the caller.
7 <strong>kern_return_t mach_port_extract_right
</strong>
8 <strong>(ipc_space_t
</strong> <var>task
</var>,
9 <strong>mach_port_name_t
</strong> <var>name
</var>,
10 <strong>mach_msg_type_name_t
</strong> <var>desired_type
</var>,
11 <strong>mach_port_poly_t
</strong> <var>*right
</var>,
12 <strong>mach_msg_type_name_
</strong> <var>*acquired_type
</var><strong>);
</strong>
20 The task holding the port right.
25 The task's name for the port right.
27 <dt> <var>desired_type
</var>
30 IPC type, specifying how the right should be extracted.
37 <dt> <var>acquired_type
</var>
40 The type of the extracted right.
44 The
<strong>mach_port_extract_right
</strong> function extracts a port
46 task and returns it to the caller as if the task sent the right
48 <var>desired_type
</var> as the disposition for the right. See
<strong>mach_msg
</strong>.
50 The returned value of
<var>acquired_type
</var> will be
51 <strong>MACH_MSG_TYPE_PORT_SEND
</strong> if a send right is extracted,
52 <strong>MACH_MSG_TYPE_PORT_RECEIVE
</strong> if a
53 receive right is extracted, and
<strong>MACH_MSG_TYPE_PORT_SEND_ONCE
</strong> if a
54 send-once right is extracted.
57 This interface is machine word length specific because of the port name
59 <h3>RETURN VALUES
</h3>
62 <dt> <strong>KERN_INVALID_NAME
</strong>
64 <var>name
</var> did not denote a right.
66 <dt> <strong>KERN_INVALID_RIGHT
</strong>
68 <var>name
</var> denoted an invalid right.
70 <h3>RELATED INFORMATION
</h3>
73 <a href=
"mach_port_insert_right.html"><strong>mach_port_insert_right
</strong></a>,
74 <a href=
"mach_msg.html"><strong>mach_msg
</strong></a>.