42 #if (CH_CFG_USE_CONDVARS == TRUE) || defined(__DOXYGEN__) 229 #if (CH_CFG_USE_CONDVARS_TIMEOUT == TRUE) || defined(__DOXYGEN__) 310 currp->u.wtobjp = cp;
void chCondObjectInit(condition_variable_t *cp)
Initializes s condition_variable_t structure.
void chDbgCheckClassS(void)
S-class functions context check.
void chMtxUnlockS(mutex_t *mp)
Unlocks the specified mutex.
void chCondBroadcast(condition_variable_t *cp)
Signals all threads that are waiting on the condition variable.
uint64_t sysinterval_t
Type of time interval.
void chCondSignal(condition_variable_t *cp)
Signals one thread that is waiting on the condition variable.
static void chSysLock(void)
Enters the kernel lock state.
void chCondSignalI(condition_variable_t *cp)
Signals one thread that is waiting on the condition variable.
struct ch_mutex * mtxlist
List of the mutexes owned by this thread.
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 currp
Current thread pointer access macro.
msg_t rdymsg
Thread wakeup code.
static void chSysUnlock(void)
Leaves the kernel lock state.
#define CH_STATE_WTCOND
On a cond.variable.
msg_t chCondWaitTimeout(condition_variable_t *cp, sysinterval_t timeout)
Waits on the condition variable releasing the mutex lock.
msg_t chCondWait(condition_variable_t *cp)
Waits on the condition variable releasing the mutex lock.
void chDbgCheckClassI(void)
I-class functions context check.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
condition_variable_t structure.
static mutex_t * chMtxGetNextMutexS(void)
Returns the next mutex in the mutexes stack of the current thread.
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.
#define chDbgCheck(c)
Function parameters check.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout)
Puts the current thread to sleep into the specified state with timeout specification.
#define MSG_OK
Normal wakeup message.
#define chDbgAssert(c, r)
Condition assertion.
msg_t chCondWaitTimeoutS(condition_variable_t *cp, sysinterval_t timeout)
Waits on the condition variable releasing the mutex lock.
void * wtobjp
Pointer to a generic "wait" object.
union ch_thread::@0 u
State-specific fields.
#define TIME_IMMEDIATE
Zero interval specification for some functions with a timeout specification.
static bool queue_notempty(const threads_queue_t *tqp)
Evaluates to true if the specified threads queue is not empty.
void chSchWakeupS(thread_t *ntp, msg_t msg)
Wakes up a thread.
threads_queue_t queue
Condition variable threads queue.
void chCondBroadcastI(condition_variable_t *cp)
Signals all threads that are waiting on the condition variable.
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.
#define MSG_RESET
Wakeup caused by a reset condition.
msg_t chCondWaitS(condition_variable_t *cp)
Waits on the condition variable releasing the mutex lock.
void chMtxLockS(mutex_t *mp)
Locks the specified mutex.
Structure representing a thread.