1 <h2>thread_set_special_port
</h2>
4 <strong>Function
</strong> - Set caller-specified special port belonging to the target thread.
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>
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>
22 <dt> <var>thread
</var>
24 [in thread send right]
25 The thread for which to set the port.
27 <dt> <var>which_port
</var>
30 The special port to be set. Valid values are:
33 <dt> <strong>THREAD_KERNEL_PORT
</strong>
35 [thread-self port] The thread's kernel port. Used by the kernel
36 to receive messages from the thread. This is the port returned
37 by
<strong>mach_thread_self
</strong>.
40 <dt> <var>special_port
</var>
42 [in thread-special send right]
43 The value for the port.
47 The
<strong>thread_set_special_port
</strong> function sets a special
48 port belonging to
<var>thread
</var>.
49 <h3>RETURN VALUES
</h3>
51 Only generic errors apply.
52 <h3>RELATED INFORMATION
</h3>
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>.