osfmk/man/thread_basic_info.html
Structure - Defines basic information for a thread.
**struct thread\_basic\_info**** { ****time\_value\_t** user\_time **;**** time\_value\_t **system\_time** ; ****integer\_t** cpu\_usage **;**** policy\_t **policy** ; ****integer\_t** run\_state **;**** integer\_t **flags** ; ****integer\_t** suspend\_count **;**** integer\_t **sleep\_time** ; ****};**** typedef struct thread\_basic\_info\* thread\_basic\_info\_t;**
user_timeThe total user run time for the thread.
system_timeThe total system run time for the thread.
cpu_usageScaled CPU usage percentage for the thread.
policyScheduling policy in effect
run_stateThe thread's run state. Possible values are:
TH_STATE_RUNNING The thread is running normally.
TH_STATE_STOPPED The thread is stopped.
TH_STATE_WAITING The thread is waiting normally.
TH_STATE_UNINTERRUPTIBLE The thread is in an un-interruptible wait state.
TH_STATE_HALTED The thread is halted at a clean point.
flagsSwap/idle flags for the thread. Possible values are:
TH_FLAGS_SWAPPED The thread is swapped out.
TH_FLAGS_IDLE The thread is an idle thread.
suspend_countThe current suspend count for the thread.
sleep_timeThe number of seconds that the thread has been sleeping.
The thread_basic_info structure defines the basic information array for threads. The thread_info function returns this array for a specified thread.
Functions: thread_info.
Data Structures: policy_fifo_info, policy_rr_info, policy_timeshare_info.