Go to the documentation of this file.
30 #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
112 if (cnt <= (
cnt_t)0) {
118 nil.current->u1.semp = sp;
thread_t * chSchReadyI(thread_t *tp)
Inserts a thread in the Ready List placing it behind its peers.
#define chDbgAssert(c, r)
Condition assertion.
#define NIL_STATE_WTQUEUE
On queue or semaph.
cnt_t nil_ready_all(void *p, cnt_t cnt, msg_t msg)
Puts in ready state all thread matching the specified status and associated object.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout)
Puts the current thread to sleep into the specified state with timeout specification.
#define chDbgCheck(c)
Function parameters check.
#define TIME_IMMEDIATE
Zero interval specification for some functions with a timeout specification.
os_instance_t nil
System data structures.
Structure representing a thread.
msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout)
Performs a wait operation on a semaphore with timeout specification.
void chSemSignalI(semaphore_t *sp)
Performs a signal operation on a semaphore.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
void chSemResetWithMessage(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
#define MSG_OK
Normal wakeup message.
cnt_t cnt
The semaphore counter.
uint64_t sysinterval_t
Type of time interval.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
thread_t * nil_find_thread(tstate_t state, void *p)
Retrieves the highest priority thread in the specified state and associated to the specified object.
void chSemResetWithMessageI(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
msg_t chSemWaitTimeout(semaphore_t *sp, sysinterval_t timeout)
Performs a wait operation on a semaphore with timeout specification.
void chSemSignal(semaphore_t *sp)
Performs a signal operation on a semaphore.
#define chSysUnlock()
Leaves the kernel lock state.
#define chSysLock()
Enters the kernel lock state.