Lines Matching refs:mutex
103 umtx_lock(UMutex *mutex) { in umtx_lock() argument
104 if (mutex == NULL) { in umtx_lock()
105 mutex = &globalMutex; in umtx_lock()
107 CRITICAL_SECTION *cs = &mutex->fCS; in umtx_lock()
108 umtx_initOnce(mutex->fInitOnce, winMutexInit, cs); in umtx_lock()
113 umtx_unlock(UMutex* mutex) in umtx_unlock() argument
115 if (mutex == NULL) { in umtx_unlock()
116 mutex = &globalMutex; in umtx_unlock()
118 LeaveCriticalSection(&mutex->fCS); in umtx_unlock()
144 umtx_condWait(UConditionVar *condition, UMutex *mutex) { in umtx_condWait() argument
161 umtx_unlock(mutex); in umtx_condWait()
163 umtx_lock(mutex); in umtx_condWait()
171 umtx_unlock(mutex); in umtx_condWait()
173 umtx_lock(mutex); in umtx_condWait()
193 umtx_lock(UMutex *mutex) { in umtx_lock() argument
194 if (mutex == NULL) { in umtx_lock()
195 mutex = &globalMutex; in umtx_lock()
197 int sysErr = pthread_mutex_lock(&mutex->fMutex); in umtx_lock()
204 umtx_unlock(UMutex* mutex) in umtx_unlock() argument
206 if (mutex == NULL) { in umtx_unlock()
207 mutex = &globalMutex; in umtx_unlock()
209 int sysErr = pthread_mutex_unlock(&mutex->fMutex); in umtx_unlock()
216 umtx_condWait(UConditionVar *cond, UMutex *mutex) { in umtx_condWait() argument
217 if (mutex == NULL) { in umtx_condWait()
218 mutex = &globalMutex; in umtx_condWait()
220 int sysErr = pthread_cond_wait(&cond->fCondition, &mutex->fMutex); in umtx_condWait()