]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/task_set_special_port.html
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / man / task_set_special_port.html
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]
38 The port for the task for which to set the port.
39 <p>
40 <dt> <var>which_port</var>
41 <dd>
42 [in scalar]
43 The 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
49 messages 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
54 kernel to receive messages to manipulate the task. This is the
55 port returned by <strong>mach_task_self</strong>. Setting this special port
56 does not change the identity of the kernel port that names the
57 task; this simply changes the value returned as the kernel
58 special 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
63 task to request information about its containing host. This is
64 the port returned by <strong>mach_host_self</strong>. Setting this special port
65 does not change the identity of the kernel port that names the
66 host; this simply changes the value returned as the host
67 special port.
68 <p>
69 <dt> <strong>TASK_WIRED_LEDGER_PORT</strong>
70 <dd>
71 [ledger send right] The resource ledger from which the task
72 draws its wired kernel memory. Setting this special port does
73 not change the ledger from which the task draws its resources;
74 this simply changes the value returned as the ledger special
75 port.
76 <p>
77 <dt> <strong>TASK_PAGED_LEDGER_PORT</strong>
78 <dd>
79 [ledger send right] The resource ledger from which the task
80 draws its default memory managed memory. Setting this
81 special port does not change the ledger from which the task
82 draws its resources; this simply changes the value returned as
83 the ledger special port.
84 </dl>
85 <p>
86 <dt> <var>special_port</var>
87 <dd>
88 [in task-special send right]
89 The value for the port.
90 </dl>
91 <h3>DESCRIPTION</h3>
92 <p>
93 The <strong>task_set_special_port</strong> function sets a special port
94 belonging to <var>task</var>.
95 <h3>NOTES</h3>
96 <p>
97 The current implementation does not support the <strong>TASK_HOST_NAME_PORT</strong>
98 features associated with this interface.
99 <h3>RETURN VALUES</h3>
100 <p>
101 Only generic errors apply.
102 <h3>RELATED INFORMATION</h3>
103 <p>
104 Functions:
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>.