thread_get_state.html   [plain text]

<strong>Function</strong> - Return the execution state for a thread.
<strong>kern_return_t   thread_get_state</strong>
                <strong>(thread_act_t</strong>                     <var>target_thread</var>,
                 <strong>thread_state_flavor_t</strong>                   <var>flavor</var>,
                 <strong>thread_state_t</strong>                       <var>old_state</var>,
                 <strong>mach_msg_type_number_t</strong>         <var>old_state_count</var><strong>);</strong>
<dt> <var>target_thread</var> 
[in thread send right]
The thread for which the execution state is to be 
returned.  The calling thread cannot specify itself.
<dt> <var>flavor</var> 
[in scalar]
The type of execution state to be returned.  Valid values
correspond to supported machined architectures.
<dt> <var>old_state</var> 
[out structure]
State information for the specified thread.
<dt> <var>old_state_count</var> 
[in/out scalar]
On input, the maximum size of the buffer; on output, the 
size returned (in natural-sized units).
The <strong>thread_get_state</strong> function returns the execution
state (for example, the
machine registers) for <var>target_thread</var>. flavor specifies the type
of state information 
The format of the data returned is machine specific; it is defined in 
Only generic errors apply.
<a href="task_info.html"><strong>task_info</strong></a>,
<a href="thread_info.html"><strong>thread_info</strong></a>,
<a href="thread_set_state.html"><strong>thread_set_state</strong></a>.