Function - Set the target thread's user-mode execution state.
kern_return_t thread_set_state (thread_act_t target_thread, thread_state_flavor_t flavor, thread_state_t new_state, target_thread new_state_count);
The thread_set_state function sets the execution state (for example, the machine registers) for target_thread. flavor specifies the type of state to set.
The format of the state to set is machine specific; it is defined in mach/thread_status.h.
Only generic errors apply.
Functions: task_info, thread_get_state, thread_info.