Lines Matching refs:cond
50 cv_signal(pthread_cond_t *cond)
54 if (cond == NULL) {
57 ret = OsEventWriteOnce(&(cond->event), 0x01);
67 cv_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
71 if ((cond == NULL) || (mutex == NULL)) {
75 (void)pthread_mutex_lock(cond->mutex);
76 if (cond->value == -1) {
77 cond->value = 0;
78 ret = LOS_EventInit(&(cond->event));
80 (void)pthread_mutex_unlock(cond->mutex);
84 (void)pthread_mutex_unlock(cond->mutex);
90 ret = LOS_EventRead(&(cond->event), 0x0f, LOS_WAITMODE_OR | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER);
100 cv_broadcast(pthread_cond_t *cond)
104 if (cond == NULL) {
108 ret = LOS_EventWrite(&(cond->event), 0x01);