]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/task_set_special_port.html
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / man / task_set_special_port.html
CommitLineData
13fec989
A
1<h2>task_set_special_port</h2>
2<hr>
3<p>
4<strong>Function</strong> - Set the indicated special port.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t task_set_special_port</strong>
8 <strong>(task_t</strong> <var>task</var>,
9 <strong>int</strong> <var>which_port</var>,
10 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
11
12
13<strong>Macro forms:</strong>
14
15
16<strong>kern_return_t task_set_bootstrap_port</strong>
17 <strong>(task_t</strong> <var>task</var>,
18 <strong>int</strong> <var>which_port</var>,
19 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
20
21
22<strong>kern_return_t task_set_kernel_port</strong>
23 <strong>(task_t</strong> <var>task</var>,
24 <strong>int</strong> <var>which_port</var>,
25 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
26
27
28<strong>kern_return_t task_set_host_name_port</strong>
29 <strong>(task_t</strong> <var>task</var>,
30 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
31</pre>
32<h3>PARAMETERS</h3>
33<dl>
34<p>
35<dt> <var>task</var>
36<dd>
37[in task send right]
38The port for the task for which to set the port.
39<p>
40<dt> <var>which_port</var>
41<dd>
42[in scalar]
43The special port to be set. Valid values are:
44<dl>
45<p>
46<dt> <strong>TASK_BOOTSTRAP_PORT</strong>
47<dd>
48[bootstrap send right] The task's bootstrap port. Used to send
49messages requesting return of other system service ports.
50<p>
51<dt> <strong>TASK_KERNEL_PORT</strong>
52<dd>
53[task-self send right] The task's kernel port. Used by the
54kernel to receive messages to manipulate the task. This is the
55port returned by <strong>mach_task_self</strong>. Setting this special port
56does not change the identity of the kernel port that names the
57task; this simply changes the value returned as the kernel
58special port.
59<p>
60<dt> <strong>TASK_HOST_NAME_PORT</strong>
61<dd>
62[host-self send right] The task's host self port. Used by the
63task to request information about its containing host. This is
64the port returned by <strong>mach_host_self</strong>. Setting this special port
65does not change the identity of the kernel port that names the
66host; this simply changes the value returned as the host
67special port.
68<p>
69<dt> <strong>TASK_WIRED_LEDGER_PORT</strong>
70<dd>
71[ledger send right] The resource ledger from which the task
72draws its wired kernel memory. Setting this special port does
73not change the ledger from which the task draws its resources;
74this simply changes the value returned as the ledger special
75port.
76<p>
77<dt> <strong>TASK_PAGED_LEDGER_PORT</strong>
78<dd>
79[ledger send right] The resource ledger from which the task
80draws its default memory managed memory. Setting this
81special port does not change the ledger from which the task
82draws its resources; this simply changes the value returned as
83the ledger special port.
84</dl>
85<p>
86<dt> <var>special_port</var>
87<dd>
88[in task-special send right]
89The value for the port.
90</dl>
91<h3>DESCRIPTION</h3>
92<p>
93The <strong>task_set_special_port</strong> function sets a special port
94belonging to <var>task</var>.
95<h3>NOTES</h3>
96<p>
97The current implementation does not support the <strong>TASK_HOST_NAME_PORT</strong>
98features associated with this interface.
99<h3>RETURN VALUES</h3>
100<p>
101Only generic errors apply.
102<h3>RELATED INFORMATION</h3>
103<p>
104Functions:
105<a href="task_create.html"><strong>task_create</strong></a>,
106<a href="task_get_special_port.html"><strong>task_get_special_port</strong></a>,
107<a href="mach_task_self.html"><strong>mach_task_self</strong></a>,
108<a href="thread_get_special_port.html"><strong>thread_get_special_port</strong></a>,
109<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>,
110<a href="mach_host_self.html"><strong>mach_host_self</strong></a>.