1 <h2>mach_port_allocate_name
</h2>
4 <strong>Function
</strong> - Create a port right with the caller-specified name.
7 <strong>kern_return_t mach_port_allocate_name
</strong>
8 <strong>(ipc_space_t
</strong> <var>task
</var>,
9 <strong>mach_port_right_t
</strong> <var>right
</var>,
10 <strong>mach_port_name_t
</strong> <var>name
</var><strong>);
</strong>
18 The task acquiring the port right.
23 The kind of entity to be created. This is one of the following:
26 <dt> <strong>MACH_PORT_RIGHT_RECEIVE
</strong>
28 <strong>mach_port_allocate_name
</strong> creates a port. The new port is
29 not a member of any port set. It doesn't have any extant send
30 or send-once rights. Its make-send count is zero, its sequence
31 number is zero, its queue limit is
<strong>MACH_PORT_QLIMIT_DEFAULT
</strong>,
32 and it has no queued messages.
33 <var>name
</var> denotes the receive right for the new port.
34 <var>task
</var> does not hold send rights for the new port, only the
35 receive right.
<strong>mach_port_insert_right
</strong> and
36 <strong>mach_port_extract_right
</strong> can be used to convert the receive right into a
37 combined send/receive right.
39 <dt> <strong>MACH_PORT_RIGHT_PORT_SET
</strong>
41 <strong>mach_port_allocate_name
</strong> creates a port set. The new port
44 <dt> <strong>MACH_PORT_RIGHT_DEAD_NAME
</strong>
46 <strong>mach_port_allocate_name
</strong> creates a dead name. The new
47 dead name has one user reference.
53 The task's name for the port right. name must not already be
54 in use for some right, and it can't be the reserved values
55 <strong>MACH_PORT_NULL
</strong> and
<strong>MACH_PORT_DEAD
</strong>.
59 The
<strong>mach_port_allocate_name
</strong> function creates a new
60 right in the specified
61 task, with a specified name for the new right.
64 This interface is machine word length specific because of the port name
66 <h3>RETURN VALUES
</h3>
69 <dt> <strong>KERN_NAME_EXISTS
</strong>
71 name was already in use for a port right.
73 <h3>RELATED INFORMATION
</h3>
76 <a href=
"mach_port_allocate.html"><strong>mach_port_allocate
</strong></a>,
77 <a href=
"mach_port_deallocate.html"><strong>mach_port_deallocate
</strong></a>,
78 <a href=
"mach_port_insert_right.html"><strong>mach_port_insert_right
</strong></a>,
79 <a href=
"mach_port_extract_right.html"><strong>mach_port_extract_right
</strong></a>.