52#if (CH_CFG_USE_SEMAPHORES == TRUE) || defined(__DOXYGEN__)
91#define __BSEMAPHORE_DATA(name, taken) \
92 {__SEMAPHORE_DATA(name.sem, ((taken) ? 0 : 1))}
102#define BSEMAPHORE_DECL(name, taken) \
103 binary_semaphore_t name = __BSEMAPHORE_DATA(name, taken)
#define chSysUnlock()
Leaves the kernel lock state.
#define chSysLock()
Enters the kernel lock state.
#define chSemReset(sp, n)
Performs a reset operation on the semaphore.
#define chSemWait(sp)
Performs a wait operation on a semaphore.
#define chSemResetI(sp, n)
Performs a reset operation on the semaphore.
#define chSemWaitS(sp)
Performs a wait operation on a semaphore.
#define chSemObjectInit(sp, n)
Initializes a semaphore with the specified counter value.
#define chDbgCheckClassS()
#define chDbgCheckClassI()
static msg_t chBSemWaitTimeoutS(binary_semaphore_t *bsp, sysinterval_t timeout)
Wait operation on the binary semaphore.
static void chBSemObjectInit(binary_semaphore_t *bsp, bool taken)
Initializes a binary semaphore.
static void chBSemReset(binary_semaphore_t *bsp, bool taken)
Reset operation on the binary semaphore.
static void chBSemResetI(binary_semaphore_t *bsp, bool taken)
Reset operation on the binary semaphore.
static bool chBSemGetStateI(const binary_semaphore_t *bsp)
Returns the binary semaphore current state.
static void chBSemSignalI(binary_semaphore_t *bsp)
Performs a signal operation on a binary semaphore.
struct ch_binary_semaphore binary_semaphore_t
Binary semaphore type.
static void chBSemSignal(binary_semaphore_t *bsp)
Performs a signal operation on a binary semaphore.
static msg_t chBSemWait(binary_semaphore_t *bsp)
Wait operation on the binary semaphore.
static msg_t chBSemWaitS(binary_semaphore_t *bsp)
Wait operation on the binary semaphore.
static msg_t chBSemWaitTimeout(binary_semaphore_t *bsp, sysinterval_t timeout)
Wait operation on the binary semaphore.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
msg_t chSemWaitTimeout(semaphore_t *sp, sysinterval_t timeout)
Performs a wait operation on a semaphore with timeout specification.
struct ch_semaphore semaphore_t
Semaphore structure.
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.
cnt_t cnt
The semaphore counter.