]>
Commit | Line | Data |
---|---|---|
1 | <h2>thread_set_state</h2> | |
2 | <hr> | |
3 | <p> | |
4 | <strong>Function</strong> - Set the target thread's user-mode execution state. | |
5 | <h3>SYNOPSIS</h3> | |
6 | <pre> | |
7 | <strong>kern_return_t thread_set_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>new_state</var>, | |
11 | <strong>target_thread</strong> <var>new_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 to set the execution state. | |
20 | The calling thread cannot specify itself. | |
21 | <p> | |
22 | <dt> <var>flavor</var> | |
23 | <dd> | |
24 | [in scalar] | |
25 | The type of state to set. Valid values correspond to | |
26 | supported machine architecture features. | |
27 | <p> | |
28 | <dt> <var>new_state</var> | |
29 | <dd> | |
30 | [pointer to in structure] | |
31 | State information for the specified thread. | |
32 | <p> | |
33 | <dt> <var>new_state_count</var> | |
34 | <dd> | |
35 | [in scalar] | |
36 | The size of the buffer (in natural-sized units). | |
37 | </dl> | |
38 | <h3>DESCRIPTION</h3> | |
39 | <p> | |
40 | The <strong>thread_set_state</strong> function sets the execution state | |
41 | (for example, the | |
42 | machine registers) for <var>target_thread</var>. <var>flavor</var> specifies the type | |
43 | of state to set. | |
44 | <p> | |
45 | The format of the state to set is machine specific; it is defined in | |
46 | <strong>mach/thread_status.h</strong>. | |
47 | <h3>RETURN VALUES</h3> | |
48 | <p> | |
49 | Only generic errors apply. | |
50 | <h3>RELATED INFORMATION</h3> | |
51 | <p> | |
52 | Functions: | |
53 | <a href="task_info.html"><strong>task_info</strong></a>, | |
54 | <a href="thread_get_state.html"><strong>thread_get_state</strong></a>, | |
55 | <a href="thread_info.html"><strong>thread_info</strong></a>. |