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