1*2c2f96dcSApple OSS Distributions<h2>thread_get_state</h2> 2*2c2f96dcSApple OSS Distributions<hr> 3*2c2f96dcSApple OSS Distributions<p> 4*2c2f96dcSApple OSS Distributions<strong>Function</strong> - Return the execution state for a thread. 5*2c2f96dcSApple OSS Distributions<h3>SYNOPSIS</h3> 6*2c2f96dcSApple OSS Distributions<pre> 7*2c2f96dcSApple OSS Distributions<strong>kern_return_t thread_get_state</strong> 8*2c2f96dcSApple OSS Distributions <strong>(thread_act_t</strong> <var>target_thread</var>, 9*2c2f96dcSApple OSS Distributions <strong>thread_state_flavor_t</strong> <var>flavor</var>, 10*2c2f96dcSApple OSS Distributions <strong>thread_state_t</strong> <var>old_state</var>, 11*2c2f96dcSApple OSS Distributions <strong>mach_msg_type_number_t</strong> <var>old_state_count</var><strong>);</strong> 12*2c2f96dcSApple OSS Distributions</pre> 13*2c2f96dcSApple OSS Distributions<h3>PARAMETERS</h3> 14*2c2f96dcSApple OSS Distributions<dl> 15*2c2f96dcSApple OSS Distributions<p> 16*2c2f96dcSApple OSS Distributions<dt> <var>target_thread</var> 17*2c2f96dcSApple OSS Distributions<dd> 18*2c2f96dcSApple OSS Distributions[in thread send right] 19*2c2f96dcSApple OSS DistributionsThe thread for which the execution state is to be 20*2c2f96dcSApple OSS Distributionsreturned. The calling thread cannot specify itself. 21*2c2f96dcSApple OSS Distributions<p> 22*2c2f96dcSApple OSS Distributions<dt> <var>flavor</var> 23*2c2f96dcSApple OSS Distributions<dd> 24*2c2f96dcSApple OSS Distributions[in scalar] 25*2c2f96dcSApple OSS DistributionsThe type of execution state to be returned. Valid values 26*2c2f96dcSApple OSS Distributionscorrespond to supported machined architectures. 27*2c2f96dcSApple OSS Distributions<p> 28*2c2f96dcSApple OSS Distributions<dt> <var>old_state</var> 29*2c2f96dcSApple OSS Distributions<dd> 30*2c2f96dcSApple OSS Distributions[out structure] 31*2c2f96dcSApple OSS DistributionsState information for the specified thread. 32*2c2f96dcSApple OSS Distributions<p> 33*2c2f96dcSApple OSS Distributions<dt> <var>old_state_count</var> 34*2c2f96dcSApple OSS Distributions<dd> 35*2c2f96dcSApple OSS Distributions[in/out scalar] 36*2c2f96dcSApple OSS DistributionsOn input, the maximum size of the buffer; on output, the 37*2c2f96dcSApple OSS Distributionssize returned (in natural-sized units). 38*2c2f96dcSApple OSS Distributions</dl> 39*2c2f96dcSApple OSS Distributions<h3>DESCRIPTION</h3> 40*2c2f96dcSApple OSS Distributions<p> 41*2c2f96dcSApple OSS DistributionsThe <strong>thread_get_state</strong> function returns the execution 42*2c2f96dcSApple OSS Distributionsstate (for example, the 43*2c2f96dcSApple OSS Distributionsmachine registers) for <var>target_thread</var>. flavor specifies the type 44*2c2f96dcSApple OSS Distributionsof state information 45*2c2f96dcSApple OSS Distributionsreturned. 46*2c2f96dcSApple OSS Distributions<p> 47*2c2f96dcSApple OSS DistributionsThe format of the data returned is machine specific; it is defined in 48*2c2f96dcSApple OSS Distributions\*L<mach/thread_status.h>\*O. 49*2c2f96dcSApple OSS Distributions<h3>RETURN VALUES</h3> 50*2c2f96dcSApple OSS Distributions<p> 51*2c2f96dcSApple OSS DistributionsOnly generic errors apply. 52*2c2f96dcSApple OSS Distributions<h3>RELATED INFORMATION</h3> 53*2c2f96dcSApple OSS Distributions<p> 54*2c2f96dcSApple OSS DistributionsFunctions: 55*2c2f96dcSApple OSS Distributions<a href="task_info.html"><strong>task_info</strong></a>, 56*2c2f96dcSApple OSS Distributions<a href="thread_info.html"><strong>thread_info</strong></a>, 57*2c2f96dcSApple OSS Distributions<a href="thread_set_state.html"><strong>thread_set_state</strong></a>. 58