74 #if (CH_CFG_USE_MUTEXES == TRUE) || defined(__DOXYGEN__) 109 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 146 if (mp->
owner != NULL) {
147 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 153 if (mp->
owner == ctp) {
177 #if (CH_CFG_USE_CONDVARS == TRUE) || \ 178 ((CH_CFG_USE_SEMAPHORES == TRUE) && \ 179 (CH_CFG_USE_SEMAPHORES_PRIORITY == TRUE)) || \ 180 ((CH_CFG_USE_MESSAGES == TRUE) && \ 181 (CH_CFG_USE_MESSAGES_PRIORITY == TRUE)) 182 #if CH_CFG_USE_CONDVARS == TRUE 185 #if (CH_CFG_USE_SEMAPHORES == TRUE) && \ 186 (CH_CFG_USE_SEMAPHORES_PRIORITY == TRUE) 189 #if (CH_CFG_USE_MESSAGES == TRUE) && (CH_CFG_USE_MESSAGES_PRIORITY == TRUE) 197 #if CH_DBG_ENABLE_ASSERTS == TRUE 220 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 226 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 287 if (mp->
owner != NULL) {
288 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 299 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 333 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 336 if (--mp->
cnt == (cnt_t)0) {
354 while (lmp != NULL) {
371 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 389 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 419 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 422 if (--mp->
cnt == (cnt_t)0) {
440 while (lmp != NULL) {
457 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 469 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 494 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 504 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 533 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 543 #if CH_CFG_USE_MUTEXES_RECURSIVE == TRUE 548 }
while (ctp->
mtxlist != NULL);
bool chMtxTryLock(mutex_t *mp)
Tries to lock a mutex.
threads_queue_t queue
Queue of the threads sleeping on this mutex.
void chMtxUnlockS(mutex_t *mp)
Unlocks the specified mutex.
static void chSysLock(void)
Enters the kernel lock state.
tprio_t prio
Thread priority.
struct ch_mutex * mtxlist
List of the mutexes owned by this thread.
#define CH_STATE_WTMTX
On a mutex.
thread_t * chSchReadyI(thread_t *tp)
Inserts a thread in the Ready List placing it behind its peers.
void queue_prio_insert(thread_t *tp, threads_queue_t *tqp)
Inserts a thread into a priority ordered queue.
#define CH_STATE_CURRENT
Currently running.
#define currp
Current thread pointer access macro.
static void chSysUnlock(void)
Leaves the kernel lock state.
struct ch_mutex * wtmtxp
Pointer to a generic mutex object.
#define CH_STATE_WTCOND
On a cond.variable.
void chMtxUnlockAllS(void)
Unlocks all mutexes owned by the invoking thread.
#define CH_STATE_SNDMSGQ
Sending a message, in queue.
thread_t * owner
Owner thread_t pointer or NULL.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
thread_t * next
Next in the list/queue.
#define chDbgCheck(c)
Function parameters check.
mutex_t * next
Next mutex_t into an owner-list or NULL.
void chSchGoSleepS(tstate_t newstate)
Puts the current thread to sleep into the specified state.
static void queue_init(threads_queue_t *tqp)
Threads queue initialization.
void chMtxLock(mutex_t *mp)
Locks the specified mutex.
bool chMtxTryLockS(mutex_t *mp)
Tries to lock a mutex.
#define CH_STATE_READY
Waiting on the ready list.
tstate_t state
Current thread state.
#define CH_STATE_WTSEM
On a semaphore.
static bool chMtxQueueNotEmptyS(mutex_t *mp)
Returns true if the mutex queue contains at least a waiting thread.
union ch_thread::@0 u
State-specific fields.
thread_t * queue_dequeue(thread_t *tp)
Removes a thread from a queue and returns it.
#define chDbgAssert(c, r)
Condition assertion.
void chDbgCheckClassS(void)
S-class functions context check.
void chMtxObjectInit(mutex_t *mp)
Initializes s mutex_t structure.
cnt_t cnt
Mutex recursion counter.
void chMtxUnlock(mutex_t *mp)
Unlocks the specified mutex.
ChibiOS/RT main include file.
thread_t * queue_fifo_remove(threads_queue_t *tqp)
Removes the first-out thread from a queue and returns it.
tprio_t realprio
Thread's own, non-inherited, priority.
void chMtxUnlockAll(void)
Unlocks all mutexes owned by the invoking thread.
void chMtxLockS(mutex_t *mp)
Locks the specified mutex.
Structure representing a thread.