]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/thread_get_state.html
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / man / thread_get_state.html
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]
19 The thread for which the execution state is to be
20 returned. The calling thread cannot specify itself.
21 <p>
22 <dt> <var>flavor</var>
23 <dd>
24 [in scalar]
25 The type of execution state to be returned. Valid values
26 correspond to supported machined architectures.
27 <p>
28 <dt> <var>old_state</var>
29 <dd>
30 [out structure]
31 State information for the specified thread.
32 <p>
33 <dt> <var>old_state_count</var>
34 <dd>
35 [in/out scalar]
36 On input, the maximum size of the buffer; on output, the
37 size returned (in natural-sized units).
38 </dl>
39 <h3>DESCRIPTION</h3>
40 <p>
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
44 of state information
45 returned.
46 <p>
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>
50 <p>
51 Only generic errors apply.
52 <h3>RELATED INFORMATION</h3>
53 <p>
54 Functions:
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>.