mach_reply_port.html   [plain text]

<strong>System Trap</strong> - Allocate a new port and insert corresponding receive right in the calling task.

<strong>mach_port_t   mach_reply_port( void )</strong>
The <strong>mach_reply_port</strong> function creates a new port for
the current task and
returns the name assigned by the kernel.  The kernel records
the name in the task's 
port name space and grants the task receive rights for the port.
The new port is 
not a member of any port set.
This function is an optimized version of <strong>mach_port_allocate</strong>
that uses no port 
references.  Its main purpose is to allocate a reply port for
the task when the task 
is starting, for example, before it has any ports to use as reply
ports for any IPC-based system functions.
If the task's task self port is null (thereby deactivating basic Mach
manipulations by the task), this call returns null.
Although the created port can be used for any purpose, the implementation may 
optimize its use as a reply port.
<dt> <strong>MACH_PORT_NULL</strong>
No port was allocated.
<dt> [reply receive right]
Any other value indicates success.
<a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>.