mach_port_get_set_status.html   [plain text]


<h2>mach_port_get_set_status</h2>
<hr>
<p>
<strong>Function</strong> - Return the port right names contained in the target port set.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   mach_port_get_set_status</strong>
                <strong>(ipc_space_t</strong>                               <var>task</var>,
                 <strong>mach_port_name_t</strong>                          <var>name</var>,
                 <strong>mach_port_name_array_t</strong>                <var>*members</var>,
                 <strong>task</strong>                                     <var>count</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>task</var> 
<dd>
[in task send right]
The task holding the port set.
<p>
<dt> <var>name</var> 
<dd>
[in scalar]
The task's name for the port set.
<p>
<dt> <var>members</var> 
<dd>
[out pointer to dynamic array of <var>mach_port_name_t</var>]
The task's names 
for the port set's members.
<p>
<dt> <var>count</var> 
<dd>
[out scalar]
The number of member names returned.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>mach_port_get_set_status</strong> function returns the individual port 
right names for all port rights contained in the specified port set.
The <var>members</var> parameter is an array that is automatically 
allocated when the reply message is received.  Note that
<strong>vm_deallocate</strong> should be used to free the array.
<p>
Note that this interface, unlike others such as <strong>task_threads</strong>,
returns a collection of port right names, NOT a collection of port rights themselves.
In other words, this function does not insert port rights into the caller's
port right name space; consequently, a call to  <strong>mach_port_get_set_status</strong>
does not affect the reference count of each port right within the target port set.
<h3>NOTES</h3>
<p>
This interface is machine word length specific because of the port name
parameter and the returned port names.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_INVALID_NAME</strong>
<dd>
<var>name</var> did not denote a right.
<p>
<dt> <strong>KERN_INVALID_RIGHT</strong>
<dd>
<var>name</var> denoted a right, but not a port set.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="mach_port_insert_member.html"><strong>mach_port_insert_member</strong></a>,
<a href="mach_port_extract_member.html"><strong>mach_port_extract_member</strong></a>,
<a href="mach_port_move_member.html"><strong>mach_port_move_member</strong></a>,
<a href="vm_deallocate.html"><strong>vm_deallocate</strong></a>.