1*5e3eaea3SApple OSS Distributions<h2>thread_info</h2> 2*5e3eaea3SApple OSS Distributions<hr> 3*5e3eaea3SApple OSS Distributions<p> 4*5e3eaea3SApple OSS Distributions<strong>Function</strong> - Return information about a thread. 5*5e3eaea3SApple OSS Distributions<h3>SYNOPSIS</h3> 6*5e3eaea3SApple OSS Distributions<pre> 7*5e3eaea3SApple OSS Distributions<strong>kern_return_t thread_info</strong> 8*5e3eaea3SApple OSS Distributions <strong>(thread_act_t</strong> <var>target_thread</var>, 9*5e3eaea3SApple OSS Distributions <strong>thread_flavor_t</strong> <var>flavor</var>, 10*5e3eaea3SApple OSS Distributions <strong>thread_info_t</strong> <var>thread_info</var>, 11*5e3eaea3SApple OSS Distributions <strong>mach_msg_type_number_t</strong> <var>thread_info_count</var><strong>);</strong> 12*5e3eaea3SApple OSS Distributions</pre> 13*5e3eaea3SApple OSS Distributions<h3>PARAMETERS</h3> 14*5e3eaea3SApple OSS Distributions<dl> 15*5e3eaea3SApple OSS Distributions<p> 16*5e3eaea3SApple OSS Distributions<dt> <var>target_thread</var> 17*5e3eaea3SApple OSS Distributions<dd> 18*5e3eaea3SApple OSS Distributions[in thread send right] 19*5e3eaea3SApple OSS DistributionsThe thread for which the information is to be 20*5e3eaea3SApple OSS Distributionsreturned. 21*5e3eaea3SApple OSS Distributions<p> 22*5e3eaea3SApple OSS Distributions<dt> <var>flavor</var> 23*5e3eaea3SApple OSS Distributions<dd> 24*5e3eaea3SApple OSS Distributions[in scalar] 25*5e3eaea3SApple OSS DistributionsThe type of information to be returned. Valid values are: 26*5e3eaea3SApple OSS Distributions<dl> 27*5e3eaea3SApple OSS Distributions<p> 28*5e3eaea3SApple OSS Distributions<dt> <strong>THREAD_BASIC_INFO</strong> 29*5e3eaea3SApple OSS Distributions<dd> 30*5e3eaea3SApple OSS DistributionsReturns basic information about the thread, such as the 31*5e3eaea3SApple OSS Distributionsthread's run state and suspend count. The returned structure is 32*5e3eaea3SApple OSS Distributions<strong>thread_basic_info</strong>. 33*5e3eaea3SApple OSS Distributions<p> 34*5e3eaea3SApple OSS Distributions<dt> <strong>THREAD_SCHED_FIFO_INFO</strong> 35*5e3eaea3SApple OSS Distributions<dd> 36*5e3eaea3SApple OSS DistributionsReturns FIFO scheduling policy information about the thread. 37*5e3eaea3SApple OSS DistributionsThe returned structure is <strong>policy_fifo_info</strong>. 38*5e3eaea3SApple OSS Distributions<p> 39*5e3eaea3SApple OSS Distributions<dt> <strong>THREAD_SCHED_RR_INFO</strong> 40*5e3eaea3SApple OSS Distributions<dd> 41*5e3eaea3SApple OSS DistributionsReturns round-robin scheduling policy information about the 42*5e3eaea3SApple OSS Distributionsthread. The returned structure is <strong>policy_rr_info</strong>. 43*5e3eaea3SApple OSS Distributions<p> 44*5e3eaea3SApple OSS Distributions<dt> <strong>THREAD_SCHED_TIMESHARE_INFO</strong> 45*5e3eaea3SApple OSS Distributions<dd> 46*5e3eaea3SApple OSS DistributionsReturns timeshare scheduling policy information about the 47*5e3eaea3SApple OSS Distributionsthread. The returned structure is <strong>policy_timeshare_info</strong>. 48*5e3eaea3SApple OSS Distributions</dl> 49*5e3eaea3SApple OSS Distributions<p> 50*5e3eaea3SApple OSS Distributions<dt> <var>thread_info</var> 51*5e3eaea3SApple OSS Distributions<dd> 52*5e3eaea3SApple OSS Distributions[out structure] 53*5e3eaea3SApple OSS DistributionsInformation about the specified thread. 54*5e3eaea3SApple OSS Distributions<p> 55*5e3eaea3SApple OSS Distributions<dt> <var>thread_info_count</var> 56*5e3eaea3SApple OSS Distributions<dd> 57*5e3eaea3SApple OSS Distributions[in/out scalar] 58*5e3eaea3SApple OSS DistributionsOn input, the maximum size of the buffer; on output, the 59*5e3eaea3SApple OSS Distributionssize returned (in natural-sized units). 60*5e3eaea3SApple OSS Distributions</dl> 61*5e3eaea3SApple OSS Distributions<h3>DESCRIPTION</h3> 62*5e3eaea3SApple OSS Distributions<p> 63*5e3eaea3SApple OSS DistributionsThe <strong>thread_info</strong> function returns an information structure 64*5e3eaea3SApple OSS Distributionsof type <var>flavor</var>. 65*5e3eaea3SApple OSS Distributions<h3>NOTES</h3> 66*5e3eaea3SApple OSS Distributions<p> 67*5e3eaea3SApple OSS DistributionsAt any given time, a thread has only one scheduling policy in 68*5e3eaea3SApple OSS Distributionseffect for it. Thus, 69*5e3eaea3SApple OSS Distributionsonly one of the scheduling information structures will be valid, 70*5e3eaea3SApple OSS Distributionsthat so indicated 71*5e3eaea3SApple OSS Distributionsby the policy value returned by <strong>THREAD_BASIC_INFO</strong>. 72*5e3eaea3SApple OSS Distributions<h3>RETURN VALUES</h3> 73*5e3eaea3SApple OSS Distributions<p> 74*5e3eaea3SApple OSS DistributionsOnly generic errors apply. 75*5e3eaea3SApple OSS Distributions<h3>RELATED INFORMATION</h3> 76*5e3eaea3SApple OSS Distributions<p> 77*5e3eaea3SApple OSS DistributionsFunctions: 78*5e3eaea3SApple OSS Distributions<a href="task_info.html"><strong>task_info</strong></a>, 79*5e3eaea3SApple OSS Distributions<a href="task_threads.html"><strong>task_threads</strong></a>, 80*5e3eaea3SApple OSS Distributions<a href="thread_get_state.html"><strong>thread_get_state</strong></a>, 81*5e3eaea3SApple OSS Distributions<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>, 82*5e3eaea3SApple OSS Distributions<a href="thread_set_state.html"><strong>thread_set_state</strong></a>. 83*5e3eaea3SApple OSS Distributions<p> 84*5e3eaea3SApple OSS DistributionsData Structures: 85*5e3eaea3SApple OSS Distributions<a href="thread_basic_info.html"><strong>thread_basic_info</strong></a>, 86*5e3eaea3SApple OSS Distributions<a href="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>, 87*5e3eaea3SApple OSS Distributions<a href="policy_fifo_info.html"><strong>policy_fifo_info</strong></a>, 88*5e3eaea3SApple OSS Distributions<a href="policy_rr_info.html"><strong>policy_rr_info</strong></a>. 89