mach_port_deallocate.html   [plain text]

<strong>Function</strong> - Decrement the target port right's user reference count.
<strong>kern_return_t   mach_port_deallocate</strong>
                <strong>(ipc_space_t</strong>                               <var>task</var>,
                 <strong>mach_port_name_t</strong>                          <var>name</var><strong>);</strong>
<dt> <var>task</var> 
[in task send right]
The task holding the right.
<dt> <var>name</var> 
[in scalar]
The task's name for the right.
The <strong>mach_port_deallocate</strong> function releases a user reference
for a right.  It is 
an alternate form of <strong>mach_port_mod_refs</strong> that allows
a task to release a user 
reference for a send or send-once right without failing if the
port has died and 
the right is now actually a dead name.
If <var>name</var> denotes a dead name, send right, or send-once right,
then the right loses 
one user reference.  If it only had one user reference, then
the right is destroyed. 
If <var>name</var> does not denote an element in the port name space, the
function returns 
This interface is machine word length specific because of the port name
<dt> <strong>KERN_INVALID_RIGHT</strong>
The <var>name</var> parameter denoted an invalid right.
<a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>,
<a href="mach_port_allocate_name.html"><strong>mach_port_allocate_name</strong></a>,
<a href="mach_port_mod_refs.html"><strong>mach_port_mod_refs</strong></a>.