ChibiOS/RT Architecture - Reference Manual - Guides |
Structure representing a thread. More...
#include <chthreads.h>
Inherits ThreadsQueue.
Data Fields | |
Thread * | p_next |
Next in the list/queue. | |
Thread * | p_prev |
Previous in the queue. | |
tprio_t | p_prio |
Thread priority. | |
struct context | p_ctx |
Processor context. | |
Thread * | p_newer |
Newer registry element. | |
Thread * | p_older |
Older registry element. | |
tstate_t | p_state |
Current thread state. | |
tmode_t | p_flags |
Various thread flags. | |
trefs_t | p_refs |
References to this thread. | |
volatile systime_t | p_time |
Thread consumed time in ticks. | |
union { | |
msg_t rdymsg | |
Thread wakeup code. | |
msg_t exitcode | |
Thread exit code. | |
void * wtobjp | |
Pointer to a generic "wait" object. | |
eventmask_t ewmask | |
Enabled events mask. | |
} | p_u |
State-specific fields. | |
ThreadsList | p_waiting |
Termination waiting list. | |
ThreadsQueue | p_msgqueue |
Messages queue. | |
msg_t | p_msg |
Thread message. | |
eventmask_t | p_epending |
Pending events mask. | |
Mutex * | p_mtxlist |
List of the mutexes owned by this thread. | |
tprio_t | p_realprio |
Thread's own, non-inherited, priority. | |
void * | p_mpool |
Memory Pool where the thread workspace is returned. |
Structure representing a thread.
Thread
structure. Definition at line 56 of file chthreads.h.
Next in the list/queue.
Reimplemented from ThreadsQueue.
Definition at line 57 of file chthreads.h.
Referenced by chSchReadyI(), dequeue(), fifo_remove(), list_insert(), list_remove(), prio_insert(), and queue_insert().
Previous in the queue.
Reimplemented from ThreadsQueue.
Definition at line 59 of file chthreads.h.
Referenced by dequeue(), lifo_remove(), prio_insert(), and queue_insert().
Thread priority.
Definition at line 61 of file chthreads.h.
Referenced by chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockS(), chSchWakeupS(), init_thread(), and prio_insert().
struct context Thread::p_ctx |
Processor context.
Definition at line 62 of file chthreads.h.
Older registry element.
Definition at line 65 of file chthreads.h.
Current thread state.
Definition at line 71 of file chthreads.h.
Referenced by chDbgTrace(), chEvtSignalI(), chMsgSend(), chMtxLockS(), chSchReadyI(), chSchWakeupS(), chThdResume(), chThdWait(), and init_thread().
Various thread flags.
Definition at line 75 of file chthreads.h.
Referenced by chThdCreateFromHeap(), chThdCreateFromMemoryPool(), chThdRelease(), chThdTerminate(), and init_thread().
References to this thread.
Definition at line 80 of file chthreads.h.
Referenced by chRegFirstThread(), chRegNextThread(), chThdAddRef(), chThdRelease(), chThdWait(), and init_thread().
volatile systime_t Thread::p_time |
Thread consumed time in ticks.
Definition at line 93 of file chthreads.h.
Referenced by init_thread().
Thread wakeup code.
chSchWakeupS()
function. Definition at line 107 of file chthreads.h.
Referenced by chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chEvtSignalI(), chMsgSend(), chSchWakeupS(), chSemResetI(), chSemSignalI(), and chSemSignalWait().
Thread exit code.
chThdWait()
on this thread. Definition at line 114 of file chthreads.h.
Referenced by chThdExit(), and chThdWait().
void* Thread::wtobjp |
Pointer to a generic "wait" object.
Definition at line 121 of file chthreads.h.
Referenced by chCondWaitS(), chDbgTrace(), chMsgSend(), chMtxLockS(), and chSemSignalWait().
Enabled events mask.
THD_STATE_WTOREVT
or THD_STATE_WTANDEVT
states. Definition at line 128 of file chthreads.h.
Referenced by chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
union { ... } Thread::p_u |
State-specific fields.
Referenced by chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chDbgTrace(), chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), chEvtWaitOneTimeout(), chMsgSend(), chMtxLockS(), chSchWakeupS(), chSemResetI(), chSemSignalI(), chSemSignalWait(), chThdExit(), and chThdWait().
Termination waiting list.
Definition at line 135 of file chthreads.h.
Referenced by chThdExit(), chThdWait(), and init_thread().
Messages queue.
Definition at line 141 of file chthreads.h.
Referenced by chMsgSend(), and init_thread().
Pending events mask.
Definition at line 151 of file chthreads.h.
Referenced by chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), chEvtWaitOneTimeout(), and init_thread().
List of the mutexes owned by this thread.
NULL
in this field. Definition at line 158 of file chthreads.h.
Referenced by chCondWaitS(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockS(), and init_thread().
Thread's own, non-inherited, priority.
Definition at line 162 of file chthreads.h.
Referenced by chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockS(), and init_thread().
void* Thread::p_mpool |
Memory Pool where the thread workspace is returned.
Definition at line 168 of file chthreads.h.
Referenced by chThdCreateFromMemoryPool(), and chThdRelease().