19 if (pthread_cond_init(&
cond->cond,
NULL) != 0) {
24 InitializeConditionVariable(&
cond->cond);
37 pthread_cond_signal(&
cond->cond);
39 WakeConditionVariable(&
cond->cond);
51 pthread_cond_broadcast(&
cond->cond);
53 WakeAllConditionVariable(&
cond->cond);
66 pthread_cond_wait(&
cond->cond, &
lock->lock);
68 SleepConditionVariableCS(&
cond->cond, &
lock->lock, INFINITE);
82 pthread_cond_destroy(&
cond->cond);
RZ_API void Ht_() free(HtName_(Ht) *ht)
#define rz_return_if_fail(expr)
#define cond(bop, top, mask, flags)
RZ_API void rz_th_cond_signal_all(RZ_NONNULL RzThreadCond *cond)
This function shall unblock all threads currently blocked on the specified condition.
RZ_API void rz_th_cond_free(RZ_NULLABLE RzThreadCond *cond)
Frees a RzThreadCond struct.
RZ_API void rz_th_cond_signal(RZ_NONNULL RzThreadCond *cond)
This function shall unblock at least one of the threads that are blocked on the specified condition.
RZ_API void rz_th_cond_wait(RZ_NONNULL RzThreadCond *cond, RZ_NONNULL RzThreadLock *lock)
The function shall block on a condition variable and shall be called with RzThreadLock locked by the ...
RZ_API RZ_OWN RzThreadCond * rz_th_cond_new(void)
Condition variables are intended to be used to communicate changes in the state of data shared betwee...
static void lock(volatile int *lk)