]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/man/task_get_special_port.html
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / man / task_get_special_port.html
old mode 100755 (executable)
new mode 100644 (file)
index 589e644..f6ccb2b
@@ -1 +1,104 @@
-<h2>task_get_special_port</h2>\r<hr>\r<p>\r<strong>Function</strong> - Return a send write to the indicated special port.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t   task_get_special_port</strong>\r                <strong>(task_t</strong>                                    <var>task</var>,\r                 <strong>int</strong>                                 <var>which_port</var>,\r                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>\r\r\r<strong>Macro Forms:</strong>\r\r\r<strong>kern_return_t   task_get_bootstrap_port</strong>\r                <strong>(task_t</strong>                                    <var>task</var>,\r                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>\r\r\r<strong>kern_return_t   task_get_kernel_port</strong>\r                <strong>(task_t</strong>                                    <var>task</var>,\r                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>\r\r\r<strong>kern_return_t   task_get_host_name_port</strong>\r                <strong>(task_t</strong>                                    <var>task</var>,\r                 <strong>task</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 return the port's \rsend right.\r<p>\r<dt> <var>which_port</var> \r<dd>\r[in scalar]\rThe special port for which the send right is requested.  Valid \rvalues are:\r<dl>\r<p>\r<dt> <strong>TASK_KERNEL_PORT</strong>\r<dd>\r[task-self send right] The port used to control this task.  Used \rto send messages that affect the task.  This is the port returned \rby <strong>mach_task_self</strong>.\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_HOST_NAME_PORT</strong>\r<dd>\r[host-self send right] The port used to request information of \rthe containing host.  This is the port returned by\r<strong>mach_host_self</strong>.\r<p>\r<dt> <strong>TASK_WIRED_LEDGER_PORT</strong>\r<dd>\r[ledger send right] The port naming the source from which \rthis task draws its wired kernel memory.\r<p>\r<dt> <strong>TASK_PAGED_LEDGER_PORT</strong>\r<dd>\r[ledger send right] The port naming the source from which \rthis task draws its default memory managed memory.\r</dl>\r<p>\r<dt> <var>special_port</var> \r<dd>\r[out task-special send right]\rThe returned value for the port.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>task_get_special_port</strong> function returns a send right\rfor a special port belonging to <var>task</var>.\r<p>\rIf one task has a send right for the kernel port of another task, it can use \rthe port to perform kernel operations for the other task.  Send rights for a \rkernel port normally are held only by the task to which the port belongs,\ror by the task's parent task.  Using the <strong>mach_msg</strong> function, however, \rany task can pass a send right for its kernel port to another task.\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="mach_task_self.html"><strong>mach_task_self</strong></a>,\r<a href="task_create.html"><strong>task_create</strong></a>,\r<a href="task_set_special_port.html"><strong>task_set_special_port</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
\ No newline at end of file
+<h2>task_get_special_port</h2>
+<hr>
+<p>
+<strong>Function</strong> - Return a send write to the indicated special port.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t   task_get_special_port</strong>
+                <strong>(task_t</strong>                                    <var>task</var>,
+                 <strong>int</strong>                                 <var>which_port</var>,
+                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>
+
+
+<strong>Macro Forms:</strong>
+
+
+<strong>kern_return_t   task_get_bootstrap_port</strong>
+                <strong>(task_t</strong>                                    <var>task</var>,
+                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>
+
+
+<strong>kern_return_t   task_get_kernel_port</strong>
+                <strong>(task_t</strong>                                    <var>task</var>,
+                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>
+
+
+<strong>kern_return_t   task_get_host_name_port</strong>
+                <strong>(task_t</strong>                                    <var>task</var>,
+                 <strong>task</strong>                              <var>special_port</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>task</var> 
+<dd>
+[in task send right]
+The port for the task for which to return the port's 
+send right.
+<p>
+<dt> <var>which_port</var> 
+<dd>
+[in scalar]
+The special port for which the send right is requested.  Valid 
+values are:
+<dl>
+<p>
+<dt> <strong>TASK_KERNEL_PORT</strong>
+<dd>
+[task-self send right] The port used to control this task.  Used 
+to send messages that affect the task.  This is the movable task port and 
+different from the one returned by <strong>mach_task_self</strong> (immovable).
+<p>
+<dt> <strong>TASK_BOOTSTRAP_PORT</strong>
+<dd>
+[bootstrap send right] The task's bootstrap port.  Used to send 
+messages requesting return of other system service ports.
+<p>
+<dt> <strong>TASK_HOST_NAME_PORT</strong>
+<dd>
+[host-self send right] The port used to request information of 
+the containing host.  This is the port returned by
+<strong>mach_host_self</strong>.
+<p>
+<dt> <strong>TASK_WIRED_LEDGER_PORT</strong>
+<dd>
+[ledger send right] The port naming the source from which 
+this task draws its wired kernel memory.
+<p>
+<dt> <strong>TASK_PAGED_LEDGER_PORT</strong>
+<dd>
+[ledger send right] The port naming the source from which 
+this task draws its default memory managed memory.
+</dl>
+<p>
+<dt> <var>special_port</var> 
+<dd>
+[out task-special send right]
+The returned value for the port.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>task_get_special_port</strong> function returns a send right
+for a special port belonging to <var>task</var>.
+<p>
+If one task has a send right for the kernel port of another task, it can use 
+the port to perform kernel operations for the other task.  Send rights for a 
+kernel port normally are held only by the task to which the port belongs,
+or by the task's parent task.  Using the <strong>mach_msg</strong> function, however, 
+any task can pass a send right for its kernel port to another task.
+<h3>NOTES</h3>
+<p>
+The current implementation does not support the <strong>TASK_HOST_NAME_PORT</strong>
+features associated with this interface.
+<h3>RETURN VALUES</h3>
+<p>
+Only generic errors apply.
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="mach_task_self.html"><strong>mach_task_self</strong></a>,
+<a href="task_create.html"><strong>task_create</strong></a>,
+<a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>,
+<a href="thread_get_special_port.html"><strong>thread_get_special_port</strong></a>,
+<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>,
+<a href="mach_host_self.html"><strong>mach_host_self</strong></a>.