bool semaphoreTryWait(Semaphore *s)
Attempts to get lock without waiting.
void semaphoreWait(Semaphore *s)
Decrements Semaphore and waits if 0.
Mutex mutex
Mutex object.
Definition: semaphore.h:16
void semaphoreSignal(Semaphore *s)
Increments the Semaphore to allow other threads to continue.
Condition variable synchronization primitive.
CondVar condvar
Condition variable object.
Definition: semaphore.h:15
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
_LOCK_T Mutex
Mutex datatype, defined in newlib.
Definition: mutex.h:12
void semaphoreInit(Semaphore *s, u64 initial_count)
Initializes a semaphore and its internal counter.
u64 count
Internal counter.
Definition: semaphore.h:17
Mutex synchronization primitive.
Semaphore structure.
Definition: semaphore.h:13
u32 CondVar
Condition variable.
Definition: condvar.h:13