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