]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/thread_get_state.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / thread_get_state.html
CommitLineData
13fec989
A
1<h2>thread_get_state</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return the execution state for a thread.
5<h3>SYNOPSIS</h3>
6<pre>
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>
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 execution state is to be
20returned. The calling thread cannot specify itself.
21<p>
22<dt> <var>flavor</var>
23<dd>
24[in scalar]
25The type of execution state to be returned. Valid values
26correspond to supported machined architectures.
27<p>
28<dt> <var>old_state</var>
29<dd>
30[out structure]
31State information for the specified thread.
32<p>
33<dt> <var>old_state_count</var>
34<dd>
35[in/out scalar]
36On input, the maximum size of the buffer; on output, the
37size returned (in natural-sized units).
38</dl>
39<h3>DESCRIPTION</h3>
40<p>
41The <strong>thread_get_state</strong> function returns the execution
42state (for example, the
43machine registers) for <var>target_thread</var>. flavor specifies the type
44of state information
45returned.
46<p>
47The format of the data returned is machine specific; it is defined in
48\*L<mach/thread_status.h>\*O.
49<h3>RETURN VALUES</h3>
50<p>
51Only generic errors apply.
52<h3>RELATED INFORMATION</h3>
53<p>
54Functions:
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>.