Semaphore API

DESCRIPTIONS

FUNCTION SIGNATURES

Create a semaphore

REXIS_SEMAPHORE *REXIS_SemaphoreCreate(_Bool is_binary, int initial_value);

Destroy a semaphore

int  REXIS_SemaphoreDestroy(REXIS_SEMAPHORE *semaphore);

Wait for a semaphore to have a value of at least one, and decrement the value

int  REXIS_SemaphoreWait(REXIS_SEMAPHORE *semaphore, int timeout_ms);

Signal a semaphore to increase its value by one

int  REXIS_SemaphoreSignal(REXIS_SEMAPHORE *semaphore);

Signal a semaphore from an ISR

void REXIS_SemaphoreSignalFromISR(REXIS_SEMAPHORE *semaphore);