4 <strong>Function
</strong> - Return information about a thread.
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>
16 <dt> <var>target_thread
</var>
18 [in thread send right]
19 The thread for which the information is to be
22 <dt> <var>flavor
</var>
25 The type of information to be returned. Valid values are:
28 <dt> <strong>THREAD_BASIC_INFO
</strong>
30 Returns basic information about the thread, such as the
31 thread's run state and suspend count. The returned structure is
32 <strong>thread_basic_info
</strong>.
34 <dt> <strong>THREAD_SCHED_FIFO_INFO
</strong>
36 Returns FIFO scheduling policy information about the thread.
37 The returned structure is
<strong>policy_fifo_info
</strong>.
39 <dt> <strong>THREAD_SCHED_RR_INFO
</strong>
41 Returns round-robin scheduling policy information about the
42 thread. The returned structure is
<strong>policy_rr_info
</strong>.
44 <dt> <strong>THREAD_SCHED_TIMESHARE_INFO
</strong>
46 Returns timeshare scheduling policy information about the
47 thread. The returned structure is
<strong>policy_timeshare_info
</strong>.
50 <dt> <var>thread_info
</var>
53 Information about the specified thread.
55 <dt> <var>thread_info_count
</var>
58 On input, the maximum size of the buffer; on output, the
59 size returned (in natural-sized units).
63 The
<strong>thread_info
</strong> function returns an information structure
64 of type
<var>flavor
</var>.
67 At any given time, a thread has only one scheduling policy in
69 only one of the scheduling information structures will be valid,
71 by the policy value returned by
<strong>THREAD_BASIC_INFO
</strong>.
72 <h3>RETURN VALUES
</h3>
74 Only generic errors apply.
75 <h3>RELATED INFORMATION
</h3>
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>.
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>.