Go to the documentation of this file.
31 #if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
66 #define chSemObjectInit(sp, n) ((sp)->cnt = (n))
81 #define chSemReset(sp, n) chSemResetWithMessage(sp, n, MSG_RESET)
100 #define chSemResetI(sp, n) chSemResetWithMessageI(sp, n, MSG_RESET)
114 #define chSemWait(sp) chSemWaitTimeout(sp, TIME_INFINITE)
128 #define chSemWaitS(sp) chSemWaitTimeoutS(sp, TIME_INFINITE)
138 #define chSemFastWaitI(sp) ((sp)->cnt--)
149 #define chSemFastSignalI(sp) ((sp)->cnt++)
156 #define chSemGetCounterI(sp) ((sp)->cnt)
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.
void chSemResetWithMessage(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
uint32_t sysinterval_t
Type of time interval.
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.