1*33de042dSApple OSS Distributions<h2>thread_set_state</h2> 2*33de042dSApple OSS Distributions<hr> 3*33de042dSApple OSS Distributions<p> 4*33de042dSApple OSS Distributions<strong>Function</strong> - Set the target thread's user-mode execution state. 5*33de042dSApple OSS Distributions<h3>SYNOPSIS</h3> 6*33de042dSApple OSS Distributions<pre> 7*33de042dSApple OSS Distributions<strong>kern_return_t thread_set_state</strong> 8*33de042dSApple OSS Distributions <strong>(thread_act_t</strong> <var>target_thread</var>, 9*33de042dSApple OSS Distributions <strong>thread_state_flavor_t</strong> <var>flavor</var>, 10*33de042dSApple OSS Distributions <strong>thread_state_t</strong> <var>new_state</var>, 11*33de042dSApple OSS Distributions <strong>target_thread</strong> <var>new_state_count</var><strong>);</strong> 12*33de042dSApple OSS Distributions</pre> 13*33de042dSApple OSS Distributions<h3>PARAMETERS</h3> 14*33de042dSApple OSS Distributions<dl> 15*33de042dSApple OSS Distributions<p> 16*33de042dSApple OSS Distributions<dt> <var>target_thread</var> 17*33de042dSApple OSS Distributions<dd> 18*33de042dSApple OSS Distributions[in thread send right] 19*33de042dSApple OSS DistributionsThe thread for which to set the execution state. 20*33de042dSApple OSS DistributionsThe calling thread cannot specify itself. 21*33de042dSApple OSS Distributions<p> 22*33de042dSApple OSS Distributions<dt> <var>flavor</var> 23*33de042dSApple OSS Distributions<dd> 24*33de042dSApple OSS Distributions[in scalar] 25*33de042dSApple OSS DistributionsThe type of state to set. Valid values correspond to 26*33de042dSApple OSS Distributionssupported machine architecture features. 27*33de042dSApple OSS Distributions<p> 28*33de042dSApple OSS Distributions<dt> <var>new_state</var> 29*33de042dSApple OSS Distributions<dd> 30*33de042dSApple OSS Distributions[pointer to in structure] 31*33de042dSApple OSS DistributionsState information for the specified thread. 32*33de042dSApple OSS Distributions<p> 33*33de042dSApple OSS Distributions<dt> <var>new_state_count</var> 34*33de042dSApple OSS Distributions<dd> 35*33de042dSApple OSS Distributions[in scalar] 36*33de042dSApple OSS DistributionsThe size of the buffer (in natural-sized units). 37*33de042dSApple OSS Distributions</dl> 38*33de042dSApple OSS Distributions<h3>DESCRIPTION</h3> 39*33de042dSApple OSS Distributions<p> 40*33de042dSApple OSS DistributionsThe <strong>thread_set_state</strong> function sets the execution state 41*33de042dSApple OSS Distributions(for example, the 42*33de042dSApple OSS Distributionsmachine registers) for <var>target_thread</var>. <var>flavor</var> specifies the type 43*33de042dSApple OSS Distributionsof state to set. 44*33de042dSApple OSS Distributions<p> 45*33de042dSApple OSS DistributionsThe format of the state to set is machine specific; it is defined in 46*33de042dSApple OSS Distributions<strong>mach/thread_status.h</strong>. 47*33de042dSApple OSS Distributions<h3>RETURN VALUES</h3> 48*33de042dSApple OSS Distributions<p> 49*33de042dSApple OSS DistributionsOnly generic errors apply. 50*33de042dSApple OSS Distributions<h3>RELATED INFORMATION</h3> 51*33de042dSApple OSS Distributions<p> 52*33de042dSApple OSS DistributionsFunctions: 53*33de042dSApple OSS Distributions<a href="task_info.html"><strong>task_info</strong></a>, 54*33de042dSApple OSS Distributions<a href="thread_get_state.html"><strong>thread_get_state</strong></a>, 55*33de042dSApple OSS Distributions<a href="thread_info.html"><strong>thread_info</strong></a>. 56