]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_port_allocate.html
xnu-344.2.tar.gz
[apple/xnu.git] / osfmk / man / mach_port_allocate.html
CommitLineData
9bccf70c 1<h2>mach_port_allocate</h2>\r<hr>\r<p>\r<strong>Function</strong> - Create caller-specified type of port right.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t mach_port_allocate</strong>\r <strong>(ipc_space_t</strong> <var>task</var>,\r <strong>mach_port_right_t</strong> <var>right</var>,\r <strong>mach_port_name_t</strong> <var>*name</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var> \r<dd>\r[in task send right]\rThe task acquiring the port right.\r<p>\r<dt> <var>right</var> \r<dd>\r[in scalar]\rThe kind of entity to be created. This is one of the following:\r<dl>\r<p>\r<dt> <strong>MACH_PORT_RIGHT_RECEIVE</strong>\r<dd>\r<strong>mach_port_allocate</strong> creates a port. The new port is not a \rmember of any port set. It doesn't have any extant send or \rsend-once rights. Its make-send count is zero, its sequence \rnumber is zero, its queue limit is <strong>MACH_PORT_QLIMIT_DEFAULT</strong>, and \rit has no queued messages. <var>name</var> denotes the \rreceive right for the new port.\r<var>task</var> does not hold send rights for the new port, only the\rreceive right. <strong>mach_port_insert_right</strong> and\r<strong>mach_port_extract_right</strong> can be used to convert the receive right into a \rcombined send/receive right.\r<p>\r<dt> <strong>MACH_PORT_RIGHT_PORT_SET</strong>\r<dd>\r<strong>mach_port_allocate</strong> creates a port set. The new port set has \rno members.\r<p>\r<dt> <strong>MACH_PORT_RIGHT_DEAD_NAME</strong>\r<dd>\r<strong>mach_port_allocate</strong> creates a dead name. The new dead \rname has one user reference.\r</dl>\r<p>\r<dt> <var>name</var> \r<dd>\r[out scalar]\rThe task's name for the port right. This can be any name \rthat wasn't in use.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>mach_port_allocate</strong> function creates a new right\rin the specified task. The new right's name is returned in name.\r<p>\rPorts that are allocated via this call do not support the full set of\rMach port semantics; in particular, the kernel will not provide no-more-senders\rnotification service requests on such ports. Any attempt to request no-more-senders\rnotification service\rwill generate an error. Use the <strong>mach_port_allocate_full</strong>\rinterface to allocate ports that support the full set of Mach port semantics.\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the port name\rparameter.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_NO_SPACE</strong>\r<dd>\rThere was no room in task's IPC name space for another right.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="mach_port_allocate_name.html"><strong>mach_port_allocate_name</strong></a>,\r<a href="mach_port_deallocate.html"><strong>mach_port_deallocate</strong></a>,\r<a href="mach_port_insert_right.html"><strong>mach_port_insert_right</strong></a>,\r<a href="mach_port_extract_right.html"><strong>mach_port_extract_right</strong></a>.\r