ChibiOS/RT
6.0.3
|
Structure representing a thread. More...
#include <chschd.h>
Data Fields | |
threads_queue_t | queue |
Threads queue header. More... | |
tprio_t | prio |
Thread priority. More... | |
struct port_context | ctx |
Processor context. More... | |
thread_t * | newer |
Newer registry element. More... | |
thread_t * | older |
Older registry element. More... | |
const char * | name |
Thread name or NULL . More... | |
stkalign_t * | wabase |
Working area base address. More... | |
tstate_t | state |
Current thread state. More... | |
tmode_t | flags |
Various thread flags. More... | |
trefs_t | refs |
References to this thread. More... | |
tslices_t | ticks |
Number of ticks remaining to this thread. More... | |
volatile systime_t | time |
Thread consumed time in ticks. More... | |
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. More... | |
threads_list_t | waiting |
Termination waiting list. More... | |
threads_queue_t | msgqueue |
Messages queue. More... | |
eventmask_t | epending |
Pending events mask. More... | |
struct ch_mutex * | mtxlist |
List of the mutexes owned by this thread. More... | |
tprio_t | realprio |
Thread's own, non-inherited, priority. More... | |
void * | mpool |
Memory Pool where the thread workspace is returned. More... | |
time_measurement_t | stats |
Thread statistics. More... | |
Structure representing a thread.
threads_queue_t ch_thread::queue |
Threads queue header.
Definition at line 154 of file chschd.h.
Referenced by chSchReadyAheadI(), chSchReadyI(), chSysIntegrityCheckI(), list_insert(), list_remove(), queue_dequeue(), queue_fifo_remove(), queue_insert(), queue_isempty(), queue_lifo_remove(), queue_notempty(), and queue_prio_insert().
tprio_t ch_thread::prio |
Thread priority.
Definition at line 155 of file chschd.h.
Referenced by _thread_init(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockAllS(), chMtxUnlockS(), chSchDoReschedule(), chSchDoRescheduleAhead(), chSchDoRescheduleBehind(), chSchWakeupS(), chThdGetPriorityX(), queue_notempty(), and queue_prio_insert().
thread_t* ch_thread::newer |
Newer registry element.
Definition at line 158 of file chschd.h.
Referenced by chRegNextThread(), and chSysIntegrityCheckI().
thread_t* ch_thread::older |
Older registry element.
Definition at line 159 of file chschd.h.
Referenced by chSysIntegrityCheckI().
const char* ch_thread::name |
Thread name or NULL
.
Definition at line 166 of file chschd.h.
Referenced by _thread_init(), chRegGetThreadNameX(), and chRegSetThreadNameX().
stkalign_t* ch_thread::wabase |
Working area base address.
Definition at line 175 of file chschd.h.
Referenced by chThdCreateStatic(), chThdCreateSuspendedI(), and chThdGetWorkingAreaX().
tstate_t ch_thread::state |
Current thread state.
Definition at line 180 of file chschd.h.
Referenced by _thread_init(), _trace_switch(), chEvtSignalI(), chMsgGet(), chMsgRelease(), chMsgSend(), chMsgWait(), chMtxLockS(), chSchGoSleepS(), chSchReadyAheadI(), chSchReadyI(), chSchWakeupS(), chThdDoDequeueNextI(), chThdRelease(), chThdResumeI(), chThdResumeS(), chThdStart(), chThdStartI(), chThdTerminatedX(), and chThdWait().
tmode_t ch_thread::flags |
Various thread flags.
Definition at line 184 of file chschd.h.
Referenced by _thread_init(), chThdCreateFromHeap(), chThdCreateFromMemoryPool(), chThdExitS(), chThdRelease(), chThdShouldTerminateX(), and chThdTerminate().
trefs_t ch_thread::refs |
References to this thread.
Definition at line 189 of file chschd.h.
Referenced by _thread_init(), chRegFirstThread(), chRegNextThread(), chThdAddRef(), chThdExitS(), chThdRelease(), and chThdWait().
tslices_t ch_thread::ticks |
Number of ticks remaining to this thread.
Definition at line 195 of file chschd.h.
Referenced by _thread_init(), chSchDoReschedule(), chSchDoRescheduleBehind(), and chSchGoSleepS().
volatile systime_t ch_thread::time |
Thread consumed time in ticks.
Definition at line 202 of file chschd.h.
Referenced by _thread_init(), and chThdGetTicksX().
msg_t ch_thread::rdymsg |
Thread wakeup code.
chSchWakeupS()
function. Definition at line 216 of file chschd.h.
Referenced by chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chEvtSignalI(), chMsgSend(), chSchGoSleepS(), chSchWakeupS(), chSemAddCounterI(), chSemResetI(), chSemSignalI(), chSemSignalWait(), chThdDoDequeueNextI(), chThdResumeI(), and chThdSuspendS().
msg_t ch_thread::exitcode |
Thread exit code.
chThdWait()
on this thread. Definition at line 223 of file chschd.h.
Referenced by chThdExitS(), and chThdWait().
void* ch_thread::wtobjp |
Pointer to a generic "wait" object.
Definition at line 230 of file chschd.h.
Referenced by _trace_switch(), and chCondWaitS().
thread_reference_t* ch_thread::wttrp |
Pointer to a generic thread reference object.
CH_STATE_SUSPENDED
state. Definition at line 237 of file chschd.h.
Referenced by chSchGoSleepS(), chThdSuspendS(), and chThdSuspendTimeoutS().
msg_t ch_thread::sentmsg |
Thread sent message.
Definition at line 242 of file chschd.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 251 of file chschd.h.
Referenced by chSchGoSleepS(), and chSemSignalWait().
struct ch_mutex* ch_thread::wtmtxp |
Pointer to a generic mutex object.
CH_STATE_WTMTX
state. Definition at line 260 of file chschd.h.
Referenced by chMtxLockS().
eventmask_t ch_thread::ewmask |
Enabled events mask.
CH_STATE_WTOREVT
or CH_STATE_WTANDEVT
states. Definition at line 268 of file chschd.h.
Referenced by chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
union { ... } ch_thread::u |
State-specific fields.
Referenced by _trace_switch(), chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), chEvtWaitOneTimeout(), chMsgGet(), chMsgSend(), chMtxLockS(), chSchGoSleepS(), chSchWakeupS(), chSemAddCounterI(), chSemResetI(), chSemSignalI(), chSemSignalWait(), chThdDoDequeueNextI(), chThdExitS(), chThdResumeI(), chThdSuspendS(), chThdSuspendTimeoutS(), and chThdWait().
threads_list_t ch_thread::waiting |
Termination waiting list.
Definition at line 275 of file chschd.h.
Referenced by _thread_init(), chThdExitS(), and chThdWait().
threads_queue_t ch_thread::msgqueue |
Messages queue.
Definition at line 281 of file chschd.h.
Referenced by _thread_init(), chMsgIsPendingI(), and chMsgSend().
eventmask_t ch_thread::epending |
Pending events mask.
Definition at line 287 of file chschd.h.
Referenced by _thread_init(), 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 294 of file chschd.h.
Referenced by _thread_init(), chMtxGetNextMutexX(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockAllS(), and chMtxUnlockS().
tprio_t ch_thread::realprio |
Thread's own, non-inherited, priority.
Definition at line 298 of file chschd.h.
Referenced by _thread_init(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockAllS(), and chMtxUnlockS().
void* ch_thread::mpool |
Memory Pool where the thread workspace is returned.
Definition at line 305 of file chschd.h.
Referenced by chThdCreateFromMemoryPool(), and chThdRelease().
time_measurement_t ch_thread::stats |
Thread statistics.
Definition at line 311 of file chschd.h.
Referenced by _stats_ctxswc(), and _thread_init().