]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/thread_info.html
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / man / thread_info.html
CommitLineData
9bccf70c 1<h2>thread_info</h2>\r<hr>\r<p>\r<strong>Function</strong> - Return information about a thread.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t thread_info</strong>\r <strong>(thread_act_t</strong> <var>target_thread</var>,\r <strong>thread_flavor_t</strong> <var>flavor</var>,\r <strong>thread_info_t</strong> <var>thread_info</var>,\r <strong>mach_msg_type_number_t</strong> <var>thread_info_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>target_thread</var> \r<dd>\r[in thread send right]\rThe thread for which the information is to be\rreturned.\r<p>\r<dt> <var>flavor</var> \r<dd>\r[in scalar]\rThe type of information to be returned. Valid values are:\r<dl>\r<p>\r<dt> <strong>THREAD_BASIC_INFO</strong>\r<dd>\rReturns basic information about the thread, such as the \rthread's run state and suspend count. The returned structure is \r<strong>thread_basic_info</strong>.\r<p>\r<dt> <strong>THREAD_SCHED_FIFO_INFO</strong>\r<dd>\rReturns FIFO scheduling policy information about the thread. \rThe returned structure is <strong>policy_fifo_info</strong>.\r<p>\r<dt> <strong>THREAD_SCHED_RR_INFO</strong>\r<dd>\rReturns round-robin scheduling policy information about the \rthread. The returned structure is <strong>policy_rr_info</strong>.\r<p>\r<dt> <strong>THREAD_SCHED_TIMESHARE_INFO</strong>\r<dd>\rReturns timeshare scheduling policy information about the \rthread. The returned structure is <strong>policy_timeshare_info</strong>.\r</dl>\r<p>\r<dt> <var>thread_info</var> \r<dd>\r[out structure]\rInformation about the specified thread.\r<p>\r<dt> <var>thread_info_count</var> \r<dd>\r[in/out scalar]\rOn input, the maximum size of the buffer; on output, the \rsize returned (in natural-sized units).\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>thread_info</strong> function returns an information structure\rof type <var>flavor</var>.\r<h3>NOTES</h3>\r<p>\rAt any given time, a thread has only one scheduling policy in\reffect for it. Thus, \ronly one of the scheduling information structures will be valid,\rthat so indicated \rby the policy value returned by <strong>THREAD_BASIC_INFO</strong>.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="task_info.html"><strong>task_info</strong></a>,\r<a href="task_threads.html"><strong>task_threads</strong></a>,\r<a href="thread_get_state.html"><strong>thread_get_state</strong></a>,\r<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>,\r<a href="thread_set_state.html"><strong>thread_set_state</strong></a>.\r<p>\rData Structures:\r<a href="thread_basic_info.html"><strong>thread_basic_info</strong></a>,\r<a href="policy_timeshare_info.html"><strong>policy_timeshare_info</strong></a>,\r<a href="policy_fifo_info.html"><strong>policy_fifo_info</strong></a>,\r<a href="policy_rr_info.html"><strong>policy_rr_info</strong></a>.\r