73#if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__)
108#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
145 if (mp->
owner != NULL) {
146#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
152 if (mp->
owner == currtp) {
177#if (CH_CFG_USE_CONDVARS == TRUE) || \
178 ((CH_CFG_USE_SEMAPHORES == TRUE) && \
179 (CH_CFG_USE_SEMAPHORES_PRIORITY == TRUE))
180#if CH_CFG_USE_CONDVARS == TRUE
183#if (CH_CFG_USE_SEMAPHORES == TRUE) && \
184 (CH_CFG_USE_SEMAPHORES_PRIORITY == TRUE)
192#if (CH_CFG_USE_MESSAGES == TRUE) && \
193 (CH_CFG_USE_MESSAGES_PRIORITY == TRUE)
201#if CH_DBG_ENABLE_ASSERTS == TRUE
224#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
230#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
292 if (mp->
owner != NULL) {
293#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
297 if (mp->
owner == currtp) {
304#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
338#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
359 while (lmp != NULL) {
376#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
394#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
424#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
445 while (lmp != NULL) {
462#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
474#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
501#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
511#if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE
516 }
while (currtp->
mtxlist != NULL);
ChibiOS/RT main include file.
#define chDbgAssert(c, r)
Condition assertion.
#define chDbgCheck(c)
Function parameters check.
#define chDbgCheckClassS()
void chMtxUnlock(mutex_t *mp)
Unlocks the specified mutex.
void chMtxUnlockAllS(void)
Unlocks all mutexes owned by the invoking thread.
bool chMtxTryLockS(mutex_t *mp)
Tries to lock a mutex.
void chMtxUnlockAll(void)
Unlocks all mutexes owned by the invoking thread.
static bool chMtxQueueNotEmptyS(mutex_t *mp)
Returns true if the mutex queue contains at least a waiting thread.
struct ch_mutex mutex_t
Type of a mutex structure.
bool chMtxTryLock(mutex_t *mp)
Tries to lock a mutex.
void chMtxLockS(mutex_t *mp)
Locks the specified mutex.
void chMtxUnlockS(mutex_t *mp)
Unlocks the specified mutex.
void chMtxObjectInit(mutex_t *mp)
Initializes s mutex_t structure.
void chMtxLock(mutex_t *mp)
Locks the specified mutex.
static void ch_queue_init(ch_queue_t *qp)
Queue initialization.
static ch_queue_t * ch_queue_dequeue(ch_queue_t *p)
Removes an element from a queue and returns it.
struct ch_queue ch_queue_t
Type of a generic bidirectional linked list header and element.
static ch_queue_t * ch_queue_fifo_remove(ch_queue_t *qp)
Removes the first-out element from a queue and returns it.
#define threadref(p)
Safe cast of a queue pointer to a thread pointer.
struct ch_thread thread_t
Type of a thread structure.
#define CH_STATE_READY
Waiting on the ready list.
#define CH_STATE_CURRENT
Currently running.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
#define CH_STATE_WTCOND
On a cond.variable.
thread_t * chSchReadyI(thread_t *tp)
Inserts a thread in the Ready List placing it behind its peers.
void chSchGoSleepS(tstate_t newstate)
Puts the current thread to sleep into the specified state.
void ch_sch_prio_insert(ch_queue_t *qp, ch_queue_t *tp)
Inserts a thread into a priority ordered queue.
#define CH_STATE_WTMTX
On a mutex.
#define CH_STATE_SNDMSGQ
Sending a message, in queue.
#define CH_STATE_WTSEM
On a semaphore.
static void chSysLock(void)
Enters the kernel lock state.
static void chSysUnlock(void)
Leaves the kernel lock state.
static thread_t * chThdGetSelfX(void)
Returns a pointer to the current thread_t.
cnt_t cnt
Mutex recursion counter.
thread_t * owner
Owner thread_t pointer or NULL.
mutex_t * next
Next mutex_t into an owner-list or NULL.
ch_queue_t queue
Queue of the threads sleeping on this mutex.
tprio_t prio
Priority of this element.
ch_queue_t * next
Next in the list/queue.
ch_queue_t queue
Threads queues element.
union ch_thread::@065317322233202114332352372014266163076165303275 hdr
Shared list headers.
struct ch_mutex * wtmtxp
Pointer to a generic mutex object.
tprio_t realprio
Thread's own, non-inherited, priority.
struct ch_mutex * mtxlist
List of the mutexes owned by this thread.
void * wtobjp
Pointer to a generic "wait" object.
tstate_t state
Current thread state.
ch_priority_queue_t pqueue
Threads ordered queues element.
union ch_thread::@250330312022121344252011223135034045240103044261 u
State-specific fields.