]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_reply_port.html
xnu-1504.3.12.tar.gz
[apple/xnu.git] / osfmk / man / mach_reply_port.html
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>
13 None.
14 </dl>
15 <h3>DESCRIPTION</h3>
16 <p>
17 The <strong>mach_reply_port</strong> function creates a new port for
18 the current task and
19 returns the name assigned by the kernel. The kernel records
20 the name in the task's
21 port name space and grants the task receive rights for the port.
22 The new port is
23 not a member of any port set.
24 <p>
25 This function is an optimized version of <strong>mach_port_allocate</strong>
26 that uses no port
27 references. Its main purpose is to allocate a reply port for
28 the task when the task
29 is starting, for example, before it has any ports to use as reply
30 ports for any IPC-based system functions.
31 <p>
32 If the task's task self port is null (thereby deactivating basic Mach
33 manipulations by the task), this call returns null.
34 <h3>CAUTIONS</h3>
35 <p>
36 Although the created port can be used for any purpose, the implementation may
37 optimize its use as a reply port.
38 <h3>RETURN VALUES</h3>
39 <dl>
40 <dt> <strong>MACH_PORT_NULL</strong>
41 <dd>
42 No port was allocated.
43 <p>
44 <dt> [reply receive right]
45 <dd>
46 Any other value indicates success.
47 </dl>
48 <h3>RELATED INFORMATION</h3>
49 <p>
50 Functions:
51 <a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>.