]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_reply_port.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / mach_reply_port.html
CommitLineData
13fec989
A
1<h2>mach_reply_port</h2>
2<hr>
3<p>
4<strong>System Trap</strong> - Allocate a new port and insert corresponding receive right in the calling task.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>#include&ltmach/mach_traps.h&gt</strong>
8
9<strong>mach_port_t mach_reply_port( void )</strong>
10</pre>
11<h3>PARAMETERS</h3>
12<dl>
13None.
14</dl>
15<h3>DESCRIPTION</h3>
16<p>
17The <strong>mach_reply_port</strong> function creates a new port for
18the current task and
19returns the name assigned by the kernel. The kernel records
20the name in the task's
21port name space and grants the task receive rights for the port.
22The new port is
23not a member of any port set.
24<p>
25This function is an optimized version of <strong>mach_port_allocate</strong>
26that uses no port
27references. Its main purpose is to allocate a reply port for
28the task when the task
29is starting, for example, before it has any ports to use as reply
30ports for any IPC-based system functions.
31<p>
32If the task's task self port is null (thereby deactivating basic Mach
33manipulations by the task), this call returns null.
34<h3>CAUTIONS</h3>
35<p>
36Although the created port can be used for any purpose, the implementation may
37optimize its use as a reply port.
38<h3>RETURN VALUES</h3>
39<dl>
40<dt> <strong>MACH_PORT_NULL</strong>
41<dd>
42No port was allocated.
43 <p>
44<dt> [reply receive right]
45<dd>
46Any other value indicates success.
47</dl>
48<h3>RELATED INFORMATION</h3>
49<p>
50Functions:
51<a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>.