30#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
65#define __SEMAPHORE_DATA(name, n) {n}
76#define SEMAPHORE_DECL(name, n) semaphore_t name = __SEMAPHORE_DATA(name, n)
92#define chSemObjectInit(sp, n) ((sp)->cnt = (n))
107#define chSemReset(sp, n) chSemResetWithMessage(sp, n, MSG_RESET)
126#define chSemResetI(sp, n) chSemResetWithMessageI(sp, n, MSG_RESET)
140#define chSemWait(sp) chSemWaitTimeout(sp, TIME_INFINITE)
154#define chSemWaitS(sp) chSemWaitTimeoutS(sp, TIME_INFINITE)
164#define chSemFastWaitI(sp) ((sp)->cnt--)
175#define chSemFastSignalI(sp) ((sp)->cnt++)
182#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.