|
ChibiOS/RT
2.5.1 |
Structure representing a thread.
Thread structure. Definition at line 87 of file chthreads.h.
#include <chthreads.h>


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. | |
| const char * | p_name |
Thread name or NULL. | |
| stkalign_t * | p_stklimit |
| Thread stack boundary. | |
| tstate_t | p_state |
| Current thread state. | |
| tmode_t | p_flags |
| Various thread flags. | |
| trefs_t | p_refs |
| References to this thread. | |
| tslices_t | p_preempt |
| Number of ticks remaining to this thread. | |
| volatile systime_t | p_time |
| Thread consumed time in ticks. | |
| 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. | |
| 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. | |
Next in the list/queue.
Reimplemented from ThreadsQueue.
Definition at line 88 of file chthreads.h.
Referenced by chSchDoRescheduleAhead(), chSchReadyI(), dequeue(), fifo_remove(), list_insert(), list_remove(), prio_insert(), and queue_insert().
Previous in the queue.
Reimplemented from ThreadsQueue.
Definition at line 90 of file chthreads.h.
Referenced by dequeue(), lifo_remove(), prio_insert(), and queue_insert().
Thread priority.
Definition at line 92 of file chthreads.h.
Referenced by _thread_init(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), chMtxUnlockS(), chSchWakeupS(), and prio_insert().
| struct context Thread::p_ctx |
Older registry element.
Definition at line 96 of file chthreads.h.
| const char* Thread::p_name |
Current thread state.
Definition at line 114 of file chthreads.h.
Referenced by _thread_init(), chEvtSignalI(), chMsgRelease(), chMsgSend(), chMsgWait(), chMtxLockS(), chSchDoRescheduleAhead(), chSchReadyI(), chSchWakeupS(), chThdRelease(), chThdResume(), chThdWait(), and dbg_trace().
Various thread flags.
Definition at line 118 of file chthreads.h.
Referenced by _thread_init(), chThdCreateFromHeap(), chThdCreateFromMemoryPool(), chThdExitS(), chThdRelease(), and chThdTerminate().
References to this thread.
Definition at line 123 of file chthreads.h.
Referenced by _thread_init(), chRegFirstThread(), chRegNextThread(), chThdAddRef(), chThdRelease(), and chThdWait().
Number of ticks remaining to this thread.
Definition at line 129 of file chthreads.h.
Referenced by _thread_init(), chSchDoRescheduleBehind(), and chSchGoSleepS().
| volatile systime_t Thread::p_time |
Thread consumed time in ticks.
Definition at line 136 of file chthreads.h.
Referenced by _thread_init().
Thread wakeup code.
chSchWakeupS() function. Definition at line 150 of file chthreads.h.
Referenced by chCondBroadcastI(), chCondSignalI(), chCondWaitS(), chEvtSignalI(), chIQPutI(), chIQResetI(), chMsgSend(), chOQGetI(), chOQResetI(), chSchWakeupS(), chSemAddCounterI(), chSemResetI(), and chSemSignalI().
Thread exit code.
chThdWait() on this thread. Definition at line 157 of file chthreads.h.
Referenced by chThdExitS(), and chThdWait().
| void* Thread::wtobjp |
Pointer to a generic "wait" object.
Definition at line 164 of file chthreads.h.
Referenced by chCondWaitS(), chMsgSend(), chMtxLockS(), and dbg_trace().
Enabled events mask.
THD_STATE_WTOREVT or THD_STATE_WTANDEVT states. Definition at line 171 of file chthreads.h.
Referenced by chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
Termination waiting list.
Definition at line 178 of file chthreads.h.
Referenced by _thread_init(), chThdExitS(), and chThdWait().
Messages queue.
Definition at line 184 of file chthreads.h.
Referenced by _thread_init(), and chMsgSend().
Pending events mask.
Definition at line 194 of file chthreads.h.
Referenced by _thread_init(), chEvtSignalI(), chEvtWaitAll(), chEvtWaitAllTimeout(), chEvtWaitAny(), chEvtWaitAnyTimeout(), chEvtWaitOne(), and chEvtWaitOneTimeout().
List of the mutexes owned by this thread.
NULL in this field. Definition at line 201 of file chthreads.h.
Referenced by _thread_init(), chCondWaitS(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAll(), and chMtxUnlockS().
Thread's own, non-inherited, priority.
Definition at line 205 of file chthreads.h.
Referenced by _thread_init(), chMtxUnlock(), chMtxUnlockAll(), and chMtxUnlockS().
| void* Thread::p_mpool |
Memory Pool where the thread workspace is returned.
Definition at line 211 of file chthreads.h.
Referenced by chThdCreateFromMemoryPool(), and chThdRelease().