]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/task_set_special_port.html
xnu-517.3.15.tar.gz
[apple/xnu.git] / osfmk / man / task_set_special_port.html
CommitLineData
9bccf70c 1<h2>task_set_special_port</h2>\r<hr>\r<p>\r<strong>Function</strong> - Set the indicated special port.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t task_set_special_port</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>int</strong> <var>which_port</var>,\r <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>\r\r\r<strong>Macro forms:</strong>\r\r\r<strong>kern_return_t task_set_bootstrap_port</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>int</strong> <var>which_port</var>,\r <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>\r\r\r<strong>kern_return_t task_set_kernel_port</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>int</strong> <var>which_port</var>,\r <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>\r\r\r<strong>kern_return_t task_set_host_name_port</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>mach_port_t</strong> <var>special_port</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 port for the task for which to set the port.\r<p>\r<dt> <var>which_port</var> \r<dd>\r[in scalar]\rThe special port to be set. Valid values are:\r<dl>\r<p>\r<dt> <strong>TASK_BOOTSTRAP_PORT</strong>\r<dd>\r[bootstrap send right] The task's bootstrap port. Used to send \rmessages requesting return of other system service ports.\r<p>\r<dt> <strong>TASK_KERNEL_PORT</strong>\r<dd>\r[task-self send right] The task's kernel port. Used by the\rkernel to receive messages to manipulate the task. This is the \rport returned by <strong>mach_task_self</strong>. Setting this special port \rdoes not change the identity of the kernel port that names the \rtask; this simply changes the value returned as the kernel\rspecial port.\r<p>\r<dt> <strong>TASK_HOST_NAME_PORT</strong>\r<dd>\r[host-self send right] The task's host self port. Used by the \rtask to request information about its containing host. This is \rthe port returned by <strong>mach_host_self</strong>. Setting this special port \rdoes not change the identity of the kernel port that names the \rhost; this simply changes the value returned as the host\rspecial port.\r<p>\r<dt> <strong>TASK_WIRED_LEDGER_PORT</strong>\r<dd>\r[ledger send right] The resource ledger from which the task \rdraws its wired kernel memory. Setting this special port does \rnot change the ledger from which the task draws its resources; \rthis simply changes the value returned as the ledger special \rport.\r<p>\r<dt> <strong>TASK_PAGED_LEDGER_PORT</strong>\r<dd>\r[ledger send right] The resource ledger from which the task \rdraws its default memory managed memory. Setting this\rspecial port does not change the ledger from which the task \rdraws its resources; this simply changes the value returned as \rthe ledger special port.\r</dl>\r<p>\r<dt> <var>special_port</var> \r<dd>\r[in task-special send right]\rThe value for the port.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>task_set_special_port</strong> function sets a special port\rbelonging to <var>task</var>.\r<h3>NOTES</h3>\r<p>\rThe current implementation does not support the <strong>TASK_HOST_NAME_PORT</strong>\rfeatures associated with this interface.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="task_create.html"><strong>task_create</strong></a>,\r<a href="task_get_special_port.html"><strong>task_get_special_port</strong></a>,\r<a href="mach_task_self.html"><strong>mach_task_self</strong></a>,\r<a href="thread_get_special_port.html"><strong>thread_get_special_port</strong></a>,\r<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>,\r<a href="mach_host_self.html"><strong>mach_host_self</strong></a>.\r