]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_reply_port.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / mach_reply_port.html
1 <h2>mach_reply_port</h2> <hr> <p> <strong>System Trap</strong> - Allocate a new port and insert corresponding receive right in the calling task. <h3>SYNOPSIS</h3> <pre> <strong>#include&ltmach/mach_traps.h&gt</strong> <strong>mach_port_t mach_reply_port( void )</strong> </pre> <h3>PARAMETERS</h3> <dl> None. </dl> <h3>DESCRIPTION</h3> <p> 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. <p> 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. <p> If the task's task self port is null (thereby deactivating basic Mach manipulations by the task), this call returns null. <h3>CAUTIONS</h3> <p> Although the created port can be used for any purpose, the implementation may optimize its use as a reply port. <h3>RETURN VALUES</h3> <dl> <dt> <strong>MACH_PORT_NULL</strong> <dd> No port was allocated. <p> <dt> [reply receive right] <dd> Any other value indicates success. </dl> <h3>RELATED INFORMATION</h3> <p> Functions: <a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>.