]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/thread_get_state.html
xnu-344.tar.gz
[apple/xnu.git] / osfmk / man / thread_get_state.html
1 <h2>thread_get_state</h2> <hr> <p> <strong>Function</strong> - Return the execution state for a thread. <h3>SYNOPSIS</h3> <pre> <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> </pre> <h3>PARAMETERS</h3> <dl> <p> <dt> <var>target_thread</var> <dd> [in thread send right] The thread for which the execution state is to be returned. The calling thread cannot specify itself. <p> <dt> <var>flavor</var> <dd> [in scalar] The type of execution state to be returned. Valid values correspond to supported machined architectures. <p> <dt> <var>old_state</var> <dd> [out structure] State information for the specified thread. <p> <dt> <var>old_state_count</var> <dd> [in/out scalar] On input, the maximum size of the buffer; on output, the size returned (in natural-sized units). </dl> <h3>DESCRIPTION</h3> <p> 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 returned. <p> The format of the data returned is machine specific; it is defined in \*L<mach/thread_status.h>\*O. <h3>RETURN VALUES</h3> <p> Only generic errors apply. <h3>RELATED INFORMATION</h3> <p> Functions: <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>.