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