Function - Decrement the target port right's user reference count.
kern_return_t mach_port_deallocate (ipc_space_t task, mach_port_name_t name);
The mach_port_deallocate function releases a user reference for a right. It is an alternate form of mach_port_mod_refs 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 name 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 name does not denote an element in the port name space, the function returns success.
This interface is machine word length specific because of the port name parameter.
Functions: mach_port_allocate, mach_port_allocate_name, mach_port_mod_refs.