Lines Matching refs:lock
12 if (!InitializeCriticalSectionAndSpinCount(&mtx->lock, _CRT_SPINCOUNT)) in mtx_init()
15 mtx->lock = OS_UNFAIR_LOCK_INIT; in mtx_init()
17 mtx->lock = 0; in mtx_init()
24 if (pthread_mutex_init(&mtx->lock, &attr) != 0) { in mtx_init()
41 pthread_mutex_destroy(&mtx->lock); in mtx_fini()
50 EnterCriticalSection(&mtx->lock); in mtx_lock()
52 os_unfair_lock_lock(&mtx->lock); in mtx_lock()
54 OSSpinLockLock(&mtx->lock); in mtx_lock()
56 pthread_mutex_lock(&mtx->lock); in mtx_lock()
65 LeaveCriticalSection(&mtx->lock); in mtx_unlock()
67 os_unfair_lock_unlock(&mtx->lock); in mtx_unlock()
69 OSSpinLockUnlock(&mtx->lock); in mtx_unlock()
71 pthread_mutex_unlock(&mtx->lock); in mtx_unlock()