ChibiOS 21.11.4
|
Structure representing a thread. More...
#include <chobjects.h>
Data Fields | |
union { | |
ch_list_t list | |
Threads lists element. More... | |
ch_queue_t queue | |
Threads queues element. More... | |
ch_priority_queue_t pqueue | |
Threads ordered queues element. More... | |
} | hdr |
Shared list headers. | |
struct port_context | ctx |
Processor context. | |
ch_queue_t | rqueue |
Registry queue element. | |
os_instance_t * | owner |
OS instance owner of this thread. | |
const char * | name |
Thread name or NULL . | |
stkalign_t * | wabase |
Working area base address. | |
tstate_t | state |
Current thread state. | |
tmode_t | flags |
Various thread flags. | |
trefs_t | refs |
References to this thread. | |
tslices_t | ticks |
Number of ticks remaining to this thread. | |
volatile systime_t | time |
Thread consumed time in ticks. | |
union { | |
msg_t rdymsg | |
Thread wakeup code. More... | |
msg_t exitcode | |
Thread exit code. More... | |
void * wtobjp | |
Pointer to a generic "wait" object. More... | |
thread_reference_t * wttrp | |
Pointer to a generic thread reference object. More... | |
msg_t sentmsg | |
Thread sent message. More... | |
struct ch_semaphore * wtsemp | |
Pointer to a generic semaphore object. More... | |
struct ch_mutex * wtmtxp | |
Pointer to a generic mutex object. More... | |
eventmask_t ewmask | |
Enabled events mask. More... | |
} | u |
State-specific fields. | |
ch_list_t | waiting |
Termination waiting list. | |
ch_queue_t | msgqueue |
Messages queue. | |
eventmask_t | epending |
Pending events mask. | |
struct ch_mutex * | mtxlist |
List of the mutexes owned by this thread. | |
tprio_t | realprio |
Thread's own, non-inherited, priority. | |
void * | mpool |
Memory Pool where the thread workspace is returned. | |
time_measurement_t | stats |
Thread statistics. |
Structure representing a thread.
Definition at line 156 of file chobjects.h.
ch_list_t ch_thread::list |
ch_queue_t ch_thread::queue |
Threads queues element.
Definition at line 168 of file chobjects.h.
Referenced by __sch_wakeup(), chCondWaitS(), chCondWaitTimeoutS(), and chMtxLockS().
ch_priority_queue_t ch_thread::pqueue |
Threads ordered queues element.
Definition at line 172 of file chobjects.h.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_reschedule_ahead(), __sch_reschedule_behind(), __thd_object_init(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAllS(), chMtxUnlockS(), chSchDoPreemption(), chSchDoYieldS(), chSchGoSleepS(), chSchIsPreemptionRequired(), chSchPreemption(), chSchRescheduleS(), chSchSelectFirst(), chSchWakeupS(), chSysGetIdleThreadX(), chThdGetPriorityX(), and chThdSetPriority().
union { ... } ch_thread::hdr |
Shared list headers.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_reschedule_ahead(), __sch_reschedule_behind(), __sch_wakeup(), __thd_object_init(), chCondWaitS(), chCondWaitTimeoutS(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAllS(), chMtxUnlockS(), chSchDoPreemption(), chSchDoYieldS(), chSchGoSleepS(), chSchIsPreemptionRequired(), chSchPreemption(), chSchRescheduleS(), chSchSelectFirst(), chSchWakeupS(), chSysGetIdleThreadX(), chThdGetPriorityX(), chThdSetPriority(), and chThdWait().
struct port_context ch_thread::ctx |
Processor context.
Definition at line 177 of file chobjects.h.
ch_queue_t ch_thread::rqueue |
Registry queue element.
Definition at line 182 of file chobjects.h.
Referenced by chRegNextThread().
os_instance_t* ch_thread::owner |
OS instance owner of this thread.
Definition at line 187 of file chobjects.h.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __thd_object_init(), chSchGoSleepS(), chSchReadyI(), and chSchWakeupS().
const char* ch_thread::name |
Thread name or NULL
.
Definition at line 192 of file chobjects.h.
Referenced by __thd_object_init(), chRegGetThreadNameX(), and chRegSetThreadNameX().
stkalign_t* ch_thread::wabase |
Working area base address.
Definition at line 201 of file chobjects.h.
Referenced by chInstanceObjectInit(), chThdCreateI(), chThdCreateStatic(), chThdCreateSuspendedI(), and chThdGetWorkingAreaX().
tstate_t ch_thread::state |
Current thread state.
Definition at line 206 of file chobjects.h.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_reschedule_ahead(), __sch_reschedule_behind(), __sch_wakeup(), __thd_object_init(), __trace_ready(), __trace_switch(), chEvtSignalI(), chInstanceObjectInit(), chMsgGet(), chMsgPollS(), chMsgRelease(), chMsgSend(), chMsgWaitS(), chMsgWaitTimeoutS(), chMtxLockS(), chSchDoPreemption(), chSchGoSleepS(), chSchGoSleepTimeoutS(), chSchReadyI(), chSchSelectFirst(), chSchWakeupS(), chThdDoDequeueNextI(), chThdExit(), chThdRelease(), chThdResumeI(), chThdResumeS(), chThdStart(), chThdStartI(), chThdTerminatedX(), chThdWait(), nil_find_thread(), and nil_ready_all().
tmode_t ch_thread::flags |
Various thread flags.
Definition at line 210 of file chobjects.h.
Referenced by __thd_object_init(), chThdCreateFromHeap(), chThdCreateFromMemoryPool(), chThdExitS(), chThdRelease(), chThdShouldTerminateX(), and chThdTerminate().
trefs_t ch_thread::refs |
References to this thread.
Definition at line 215 of file chobjects.h.
Referenced by __thd_object_init(), chRegFirstThread(), chRegNextThread(), chThdAddRef(), chThdExitS(), chThdRelease(), and chThdWait().
tslices_t ch_thread::ticks |
Number of ticks remaining to this thread.
Definition at line 221 of file chobjects.h.
Referenced by __sch_reschedule_behind(), __thd_object_init(), chSchDoPreemption(), chSchGoSleepS(), chSchIsPreemptionRequired(), chSchPreemption(), and chSysTimerHandlerI().
volatile systime_t ch_thread::time |
Thread consumed time in ticks.
Definition at line 228 of file chobjects.h.
Referenced by __thd_object_init(), chSysTimerHandlerI(), and chThdGetTicksX().
msg_t ch_thread::rdymsg |
Thread wakeup code.
chSchWakeupS()
function. Definition at line 242 of file chobjects.h.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_wakeup(), chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chEvtSignalI(), chMsgSend(), chSchGoSleepTimeoutS(), chSchWakeupS(), chSemAddCounterI(), chSemResetWithMessageI(), chSemSignalI(), chSemSignalWait(), chSemWaitS(), chThdDoDequeueNextI(), and chThdResumeI().
msg_t ch_thread::exitcode |
Thread exit code.
chThdWait()
on this thread. Definition at line 249 of file chobjects.h.
Referenced by chThdExitS(), and chThdWait().
void* ch_thread::wtobjp |
Pointer to a generic "wait" object.
Definition at line 256 of file chobjects.h.
Referenced by __trace_switch(), chCondWaitS(), and chCondWaitTimeoutS().
thread_reference_t* ch_thread::wttrp |
Pointer to a generic thread reference object.
CH_STATE_SUSPENDED
state. Definition at line 263 of file chobjects.h.
Referenced by __sch_wakeup(), chThdSuspendS(), and chThdSuspendTimeoutS().
msg_t ch_thread::sentmsg |
Thread sent message.
Definition at line 268 of file chobjects.h.
Referenced by chMsgGet(), and chMsgSend().
struct ch_semaphore* ch_thread::wtsemp |
Pointer to a generic semaphore object.
CH_STATE_WTSEM
state. Definition at line 277 of file chobjects.h.
Referenced by __sch_wakeup(), chSemSignalWait(), chSemWaitS(), and chSemWaitTimeoutS().
struct ch_mutex* ch_thread::wtmtxp |
Pointer to a generic mutex object.
CH_STATE_WTMTX
state. Definition at line 286 of file chobjects.h.
Referenced by chMtxLockS().
eventmask_t ch_thread::ewmask |
Enabled events mask.
CH_STATE_WTOREVT
or CH_STATE_WTANDEVT
states. Definition at line 294 of file chobjects.h.
Referenced by chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
union { ... } ch_thread::u |
State-specific fields.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_wakeup(), __trace_switch(), chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chCondWaitTimeoutS(), chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), chEvtWaitOneTimeout(), chMsgGet(), chMsgSend(), chMtxLockS(), chSchGoSleepTimeoutS(), chSchWakeupS(), chSemAddCounterI(), chSemResetWithMessageI(), chSemSignalI(), chSemSignalWait(), chSemWaitS(), chSemWaitTimeoutS(), chThdDoDequeueNextI(), chThdExitS(), chThdResumeI(), chThdSuspendS(), chThdSuspendTimeoutS(), and chThdWait().
ch_list_t ch_thread::waiting |
Termination waiting list.
Definition at line 301 of file chobjects.h.
Referenced by __thd_object_init(), chThdExitS(), and chThdWait().
ch_queue_t ch_thread::msgqueue |
Messages queue.
Definition at line 307 of file chobjects.h.
Referenced by __thd_object_init(), chMsgIsPendingI(), chMsgPollS(), chMsgSend(), chMsgWaitS(), and chMsgWaitTimeoutS().
eventmask_t ch_thread::epending |
Pending events mask.
Definition at line 313 of file chobjects.h.
Referenced by __thd_object_init(), chEvtGetAndClearEventsI(), chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
struct ch_mutex* ch_thread::mtxlist |
List of the mutexes owned by this thread.
NULL
in this field. Definition at line 320 of file chobjects.h.
Referenced by __thd_object_init(), chMtxLockS(), chMtxTryLockS(), chMtxUnlock(), chMtxUnlockAllS(), and chMtxUnlockS().
tprio_t ch_thread::realprio |
Thread's own, non-inherited, priority.
Definition at line 324 of file chobjects.h.
Referenced by __thd_object_init(), chMtxUnlock(), chMtxUnlockAllS(), chMtxUnlockS(), and chThdSetPriority().
void* ch_thread::mpool |
Memory Pool where the thread workspace is returned.
Definition at line 331 of file chobjects.h.
Referenced by chThdCreateFromMemoryPool(), and chThdRelease().
time_measurement_t ch_thread::stats |
Thread statistics.
Definition at line 337 of file chobjects.h.
Referenced by __stats_ctxswc(), __thd_object_init(), and chInstanceObjectInit().