31#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
66#define __SEMAPHORE_DATA(name, n) {n}
77#define SEMAPHORE_DECL(name, n) semaphore_t name = __SEMAPHORE_DATA(name, n)
93#define chSemObjectInit(sp, n) ((sp)->cnt = (n))
108#define chSemReset(sp, n) chSemResetWithMessage(sp, n, MSG_RESET)
127#define chSemResetI(sp, n) chSemResetWithMessageI(sp, n, MSG_RESET)
141#define chSemWait(sp) chSemWaitTimeout(sp, TIME_INFINITE)
155#define chSemWaitS(sp) chSemWaitTimeoutS(sp, TIME_INFINITE)
165#define chSemFastWaitI(sp) ((sp)->cnt--)
176#define chSemFastSignalI(sp) ((sp)->cnt++)
183#define chSemGetCounterI(sp) ((sp)->cnt)
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.
struct ch_semaphore semaphore_t
Semaphore structure.
void chSemResetWithMessageI(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
void chSemResetWithMessage(semaphore_t *sp, cnt_t n, msg_t msg)
Performs a reset operation on the semaphore.
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.
uint64_t sysinterval_t
Type of time interval.