]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_reply_port.html
xnu-344.tar.gz
[apple/xnu.git] / osfmk / man / mach_reply_port.html
CommitLineData
9bccf70c 1<h2>mach_reply_port</h2>\r<hr>\r<p>\r<strong>System Trap</strong> - Allocate a new port and insert corresponding receive right in the calling task.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>#include&ltmach/mach_traps.h&gt</strong>\r\r<strong>mach_port_t mach_reply_port( void )</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\rNone.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mach_reply_port</strong> function creates a new port for\rthe current task and\rreturns the name assigned by the kernel. The kernel records\rthe name in the task's \rport name space and grants the task receive rights for the port.\rThe new port is \rnot a member of any port set.\r<p>\rThis function is an optimized version of <strong>mach_port_allocate</strong>\rthat uses no port \rreferences. Its main purpose is to allocate a reply port for\rthe task when the task \ris starting, for example, before it has any ports to use as reply\rports for any IPC-based system functions.\r<p>\rIf the task's task self port is null (thereby deactivating basic Mach\rmanipulations by the task), this call returns null.\r<h3>CAUTIONS</h3>\r<p>\rAlthough the created port can be used for any purpose, the implementation may \roptimize its use as a reply port.\r<h3>RETURN VALUES</h3>\r<dl>\r<dt> <strong>MACH_PORT_NULL</strong>\r<dd>\rNo port was allocated.\r <p>\r<dt> [reply receive right]\r<dd>\rAny other value indicates success.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>.\r