Go to the documentation of this file.
30 #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
112 if (cnt <= (
cnt_t)0) {
thread_t * chSchReadyI(thread_t *tp, msg_t msg)
Makes the specified thread ready for execution.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout)
Puts the current thread to sleep into the specified state with timeout specification.
void chDbgCheckClassS(void)
S-class functions context check.
volatile cnt_t cnt
Threads Queue counter.
#define NIL_STATE_WTQUEUE
On queue or semaph.
#define MSG_TIMEOUT
Wake-up caused by a timeout condition.
#define MSG_OK
OK wakeup message.
semaphore_t * semp
Pointer to semaphore.
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.
#define chDbgCheck(c)
Function parameters check.
void chDbgCheckClassI(void)
I-class functions context check.
os_instance_t nil
System data structures.
msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout)
Performs a wait operation on a semaphore with timeout specification.
Structure representing a queue of threads.
void chSemSignalI(semaphore_t *sp)
Performs a signal operation on a semaphore.
Structure representing a thread.
#define chDbgAssert(c, r)
Condition assertion.
void chSemResetWithMessage(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
thread_t * current
Pointer to the running thread.
#define TIME_IMMEDIATE
Zero time specification for some functions with a timeout specification.
uint32_t sysinterval_t
Type of time interval.
Nil RTOS main header file.
void chSchRescheduleS(void)
Reschedules if needed.
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.