1 <h2>thread_get_state
</h2>
4 <strong>Function
</strong> - Return the execution state for a thread.
7 <strong>kern_return_t thread_get_state
</strong>
8 <strong>(thread_act_t
</strong> <var>target_thread
</var>,
9 <strong>thread_state_flavor_t
</strong> <var>flavor
</var>,
10 <strong>thread_state_t
</strong> <var>old_state
</var>,
11 <strong>mach_msg_type_number_t
</strong> <var>old_state_count
</var><strong>);
</strong>
16 <dt> <var>target_thread
</var>
18 [in thread send right]
19 The thread for which the execution state is to be
20 returned. The calling thread cannot specify itself.
22 <dt> <var>flavor
</var>
25 The type of execution state to be returned. Valid values
26 correspond to supported machined architectures.
28 <dt> <var>old_state
</var>
31 State information for the specified thread.
33 <dt> <var>old_state_count
</var>
36 On input, the maximum size of the buffer; on output, the
37 size returned (in natural-sized units).
41 The
<strong>thread_get_state
</strong> function returns the execution
42 state (for example, the
43 machine registers) for
<var>target_thread
</var>. flavor specifies the type
47 The format of the data returned is machine specific; it is defined in
48 \*L
<mach/thread_status.h
>\*O.
49 <h3>RETURN VALUES
</h3>
51 Only generic errors apply.
52 <h3>RELATED INFORMATION
</h3>
55 <a href=
"task_info.html"><strong>task_info
</strong></a>,
56 <a href=
"thread_info.html"><strong>thread_info
</strong></a>,
57 <a href=
"thread_set_state.html"><strong>thread_set_state
</strong></a>.