Back to Darwin Xnu

Thread Set State

osfmk/man/thread_set_state.html

latest1.2 KB
Original Source

thread_set_state


Function - Set the target thread's user-mode execution state.

SYNOPSIS

**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** );**

PARAMETERS

target_thread[in thread send right] The thread for which to set the execution state. The calling thread cannot specify itself.

flavor[in scalar] The type of state to set. Valid values correspond to supported machine architecture features.

new_state[pointer to in structure] State information for the specified thread.

new_state_count[in scalar] The size of the buffer (in natural-sized units).

DESCRIPTION

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.

RETURN VALUES

Only generic errors apply.

Functions: task_info, thread_get_state, thread_info.