|
ChibiOS
20.3.4
|
Structure representing a thread. More...
#include <chschd.h>

Data Fields | |
| 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... | |
| ch_list_t | waiting |
| Termination waiting list. More... | |
| ch_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... | |
| 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... | |
Structure representing a thread.
| ch_queue_t ch_thread::queue |
| ch_priority_queue_t ch_thread::pqueue |
Threads ordered queues element.
Definition at line 138 of file chschd.h.
Referenced by _thread_init(), chMtxUnlock(), chMtxUnlockAllS(), chSchDoReschedule(), chSchDoRescheduleAhead(), chSchDoRescheduleBehind(), and chThdGetPriorityX().
| struct port_context ch_thread::ctx |
| thread_t* ch_thread::newer |
| const char* ch_thread::name |
Thread name or NULL.
Definition at line 151 of file chschd.h.
Referenced by _thread_init(), chRegGetThreadNameX(), and chRegSetThreadNameX().
| stkalign_t* ch_thread::wabase |
Working area base address.
Definition at line 160 of file chschd.h.
Referenced by chSysInit(), chThdCreateStatic(), and chThdGetWorkingAreaX().
| tstate_t ch_thread::state |
Current thread state.
Definition at line 165 of file chschd.h.
Referenced by _thread_init(), chMsgGet(), chMsgPollS(), chMsgRelease(), chSchGoSleepTimeoutS(), chSysInit(), 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 169 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 174 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 180 of file chschd.h.
Referenced by _thread_init(), chSchDoReschedule(), and chSchDoRescheduleBehind().
| volatile systime_t ch_thread::time |
Thread consumed time in ticks.
Definition at line 187 of file chschd.h.
Referenced by _thread_init(), and chThdGetTicksX().
| msg_t ch_thread::rdymsg |
Thread wakeup code.
chSchWakeupS() function. Definition at line 201 of file chschd.h.
Referenced by chSemSignalWait(), chThdDoDequeueNextI(), and chThdResumeI().
| msg_t ch_thread::exitcode |
Thread exit code.
chThdWait() on this thread. Definition at line 208 of file chschd.h.
Referenced by chThdExitS(), and chThdWait().
| void* ch_thread::wtobjp |
| thread_reference_t* ch_thread::wttrp |
Pointer to a generic thread reference object.
CH_STATE_SUSPENDED state. Definition at line 222 of file chschd.h.
Referenced by chThdSuspendS(), and chThdSuspendTimeoutS().
| msg_t ch_thread::sentmsg |
Thread sent message.
Definition at line 227 of file chschd.h.
Referenced by chMsgGet(), and chMsgSend().
| struct ch_semaphore* ch_thread::wtsemp |
| struct ch_mutex* ch_thread::wtmtxp |
| eventmask_t ch_thread::ewmask |
Enabled events mask.
CH_STATE_WTOREVT or CH_STATE_WTANDEVT states. Definition at line 253 of file chschd.h.
Referenced by chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
| union { ... } ch_thread::u |
State-specific fields.
Referenced by chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), chEvtWaitOneTimeout(), chMsgGet(), chMsgSend(), chSemSignalWait(), chThdDoDequeueNextI(), chThdExitS(), chThdResumeI(), chThdSuspendS(), chThdSuspendTimeoutS(), and chThdWait().
| ch_list_t ch_thread::waiting |
Termination waiting list.
Definition at line 260 of file chschd.h.
Referenced by _thread_init(), chThdExitS(), and chThdWait().
| ch_queue_t ch_thread::msgqueue |
| eventmask_t ch_thread::epending |
Pending events mask.
Definition at line 272 of file chschd.h.
Referenced by _thread_init(), 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 279 of file chschd.h.
Referenced by _thread_init(), chMtxUnlock(), and chMtxUnlockAllS().
| tprio_t ch_thread::realprio |
Thread's own, non-inherited, priority.
Definition at line 283 of file chschd.h.
Referenced by _thread_init(), chMtxUnlock(), and chMtxUnlockAllS().
| void* ch_thread::mpool |
Memory Pool where the thread workspace is returned.
Definition at line 290 of file chschd.h.
Referenced by chThdCreateFromMemoryPool(), and chThdRelease().
| time_measurement_t ch_thread::stats |
Thread statistics.
Definition at line 296 of file chschd.h.
Referenced by _stats_ctxswc(), and _thread_init().