]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/thread_set_special_port.html
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / man / thread_set_special_port.html
1 <h2>thread_set_special_port</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Set caller-specified special port belonging to the target thread.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t thread_set_special_port</strong>
8 <strong>(thread_act_t</strong> <var>thread</var>,
9 <strong>int</strong> <var>which_port</var>,
10 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
11 </pre>
12
13 <h4>Macro form:</h4>
14 <pre>
15 <strong>kern_return_t thread_set_kernel_port</strong>
16 <strong>(thread_act_t</strong> <var>thread</var>,
17 <strong>mach_port_t</strong> <var>special_port</var><strong>);</strong>
18 </pre>
19 <h3>PARAMETERS</h3>
20 <dl>
21 <p>
22 <dt> <var>thread</var>
23 <dd>
24 [in thread send right]
25 The thread for which to set the port.
26 <p>
27 <dt> <var>which_port</var>
28 <dd>
29 [in scalar]
30 The special port to be set. Valid values are:
31 <dl>
32 <p>
33 <dt> <strong>THREAD_KERNEL_PORT</strong>
34 <dd>
35 [thread-self port] The thread's kernel port. Used by the kernel
36 to receive messages from the thread. This is the movable
37 port for the thread and different from <strong>mach_thread_self</strong>(immovable).
38 </dl>
39 <p>
40 <dt> <var>special_port</var>
41 <dd>
42 [in thread-special send right]
43 The value for the port.
44 </dl>
45 <h3>DESCRIPTION</h3>
46 <p>
47 The <strong>thread_set_special_port</strong> function sets a special
48 port belonging to <var>thread</var>.
49 <h3>RETURN VALUES</h3>
50 <p>
51 Only generic errors apply.
52 <h3>RELATED INFORMATION</h3>
53 <p>
54 Functions:
55 <a href="mach_thread_self.html"><strong>mach_thread_self</strong></a>,
56 <a href="task_get_special_port.html"><strong>task_get_special_port</strong></a>,
57 <a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>,
58 <a href="thread_create.html"><strong>thread_create</strong></a>,
59 <a href="thread_get_special_port.html"><strong>thread_get_special_port</strong></a>.