45 void sem_init(semaphore_t *sem, int16_t initial_permits, int16_t max_permits);
74 void sem_reset(semaphore_t *sem, int16_t permits);
bool sem_acquire_timeout_us(semaphore_t *sem, uint32_t timeout_us)
Acquire a permit from a semaphore, with timeout.
Definition: sem.c:42
bool sem_try_acquire(semaphore_t *sem)
Attempt to acquire a permit from a semaphore without blocking.
Definition: sem.c:60
bool sem_acquire_timeout_ms(semaphore_t *sem, uint32_t timeout_ms)
Acquire a permit from a semaphore, with timeout.
Definition: sem.c:38
bool sem_acquire_block_until(semaphore_t *sem, absolute_time_t until)
Wait to acquire a permit from a semaphore until a specific time.
Definition: sem.c:46
void sem_init(semaphore_t *sem, int16_t initial_permits, int16_t max_permits)
Initialise a semaphore structure.
Definition: sem.c:10
void sem_reset(semaphore_t *sem, int16_t permits)
Reset semaphore to a specific number of available permits.
Definition: sem.c:85
int sem_available(semaphore_t *sem)
Return number of available permits on the semaphore.
Definition: sem.c:17
bool sem_release(semaphore_t *sem)
Release a permit on a semaphore.
Definition: sem.c:72
void sem_acquire_blocking(semaphore_t *sem)
Acquire a permit from the semaphore.
Definition: sem.c:26
recursive mutex instance
Definition: mutex.h:47
Definition: lock_core.h:53