19 #define TRN_CONDVAR_STATIC_INITIALIZER {.key = 0}
void trn_condvar_create(trn_condvar_t *condvar)
Creates a condition variable.
result_t trn_condvar_wait(trn_condvar_t *condvar, trn_mutex_t *mutex, uint64_t timeout) REQUIRES(mutex)
Waits for the condition variable to be signalled.
result_t trn_condvar_signal(trn_condvar_t *condvar, int n)
Signals n threads waiting on the condition variable, or -1 for all of them.
uint32_t result_t
Function result.
Definition: types.h:51
void trn_condvar_destroy(trn_condvar_t *condvar)
Destroys a condition variable.
Mutex functions and thread-safety macros.