]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_port_allocate_full.html
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / man / mach_port_allocate_full.html
1 <h2>mach_port_allocate_full</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Create a port right with full Mach port semantics.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t mach_port_allocate_full</strong>
8 <strong>(ipc_space_t</strong> <var>task</var>,
9 <strong>mach_port_right_t</strong> <var>right</var>,
10 <strong>subsystem_t</strong> <var>subsystem</var>,
11 <strong>mach_port_qos_t</strong> <var>qos</var>,
12 <strong>task</strong> <var>name</var><strong>);</strong>
13 </pre>
14 <h3>PARAMETERS</h3>
15 <dl>
16 <p>
17 <dt> <var>task</var>
18 <dd>
19 [in task send right] The task acquiring the port right.
20 <p>
21 <dt> <var>right</var>
22 <dd>
23 [in scalar] The kind of entity to be created. This is one of the following:
24 <dl>
25 <p>
26 <dt> <strong>MACH_PORT_RIGHT_RECEIVE</strong>
27 <dd>
28 <strong>mach_port_allocate_full</strong> creates a port. The new port is not a member
29 of any port set. It doesn't have any extant send or send-once
30 rights. Its make-send count is zero, its sequence number is zero, its
31 queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued
32 messages. The <var>name</var> parameter
33 denotes the receive right for the new port.
34 The owning task does not hold send rights for the new port, only the receive
35 right. The <strong>mach_port_insert_right</strong>
36 and <strong>mach_port_extract_right</strong> interfaces can be used
37 to convert the receive right to a combined send/receive right.
38 <p>
39 <dt> <strong>MACH_PORT_RIGHT_PORT_SET</strong>
40 <dd>
41 <strong>mach_port_allocate_full</strong> creates a port set. The new port set
42 has no members.
43 <p>
44 <dt> <strong>MACH_PORT_RIGHT_DEAD_NAME</strong>
45 <dd>
46 <strong>mach_port_allocate_full</strong> creates a dead name. The new dead
47 name has one user reference.
48 </dl>
49 <p>
50 <dt> <var>subsystem</var>
51 <dd>
52 [in scalar] The port right naming the subsystem the newly created port
53 is to be associated with.
54 <p>
55 <p>
56 <dt> <var>qos</var>
57 <dd>
58 [pointer to an in/out structure] Structure used to specify
59 the desired "quality of service." This structure may be used
60 to mandate the name of the returned port right and/or the port's "quality
61 of service" attribute. The current implementation recognizes two such
62 attributes: regular and realtime.
63 <dt> <var>name</var>
64 <dd>
65 [out scalar] The task's name for the port right. This can be any name
66 that wasn't in use.
67 </dl>
68 <h3>DESCRIPTION</h3>
69 <p>
70 The <strong>mach_port_allocate_full</strong> function creates a new right in the
71 specified task. The new right's name is returned via the <var>name</var> parameter.
72 The new port supports the full set of Mach port semantics (i.e. no_more_senders
73 detection will work, if requested).
74 <h3>NOTES</h3>
75 <p>
76 This interface is machine word length specific because of the port
77 name parameter.
78 <h3>RETURN VALUES</h3>
79 <dl>
80 <p>
81 <dt> <strong>KERN_NO_SPACE</strong>
82 <dd>
83 There was no room in task's IPC name space for another right.
84 </dl>
85 <h3>RELATED INFORMATION</h3>
86 <p>
87 Functions:
88 <a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>,
89 <a href="mach_port_allocate.html"><strong>mach_port_allocate_qos</strong></a>,
90 <a href="mach_port_allocate_name.html"><strong>mach_port_allocate_name</strong></a>,
91 <a href="mach_port_deallocate.html"><strong>mach_port_deallocate</strong></a>,
92 <a href="mach_port_insert_right.html"><strong>mach_port_insert_right</strong></a>,
93 <a href="mach_port_extract_right.html"><strong>mach_port_extract_right</strong></a>.
94 <p>
95 Structures:
96 <a href="mach_port_qos.html"><strong>mach_port_qos</strong></a>.