Lines Matching refs:lock

51 	CRITICAL_SECTION *lock = mm_malloc(sizeof(CRITICAL_SECTION));  in evthread_win32_lock_create()  local
52 if (!lock) in evthread_win32_lock_create()
54 if (InitializeCriticalSectionAndSpinCount(lock, SPIN_COUNT) == 0) { in evthread_win32_lock_create()
55 mm_free(lock); in evthread_win32_lock_create()
58 return lock; in evthread_win32_lock_create()
64 CRITICAL_SECTION *lock = _lock; in evthread_win32_lock_free() local
65 DeleteCriticalSection(lock); in evthread_win32_lock_free()
66 mm_free(lock); in evthread_win32_lock_free()
72 CRITICAL_SECTION *lock = _lock; in evthread_win32_lock() local
74 return ! TryEnterCriticalSection(lock); in evthread_win32_lock()
76 EnterCriticalSection(lock); in evthread_win32_lock()
84 CRITICAL_SECTION *lock = _lock; in evthread_win32_unlock() local
85 LeaveCriticalSection(lock); in evthread_win32_unlock()
158 CRITICAL_SECTION *lock = _lock; in evthread_win32_condvar_wait() local
166 result = SleepConditionVariableCS_fn(cond, lock, ms); in evthread_win32_condvar_wait()
181 CRITICAL_SECTION lock; member
193 if (InitializeCriticalSectionAndSpinCount(&cond->lock, SPIN_COUNT)==0) { in evthread_win32_cond_alloc()
198 DeleteCriticalSection(&cond->lock); in evthread_win32_cond_alloc()
210 DeleteCriticalSection(&cond->lock); in evthread_win32_cond_free()
219 EnterCriticalSection(&cond->lock); in evthread_win32_cond_signal()
226 LeaveCriticalSection(&cond->lock); in evthread_win32_cond_signal()
234 CRITICAL_SECTION *lock = _lock; in evthread_win32_cond_wait() local
242 EnterCriticalSection(&cond->lock); in evthread_win32_cond_wait()
245 LeaveCriticalSection(&cond->lock); in evthread_win32_cond_wait()
247 LeaveCriticalSection(lock); in evthread_win32_cond_wait()
253 EnterCriticalSection(&cond->lock); in evthread_win32_cond_wait()
284 LeaveCriticalSection(&cond->lock); in evthread_win32_cond_wait()
287 EnterCriticalSection(lock); in evthread_win32_cond_wait()
289 EnterCriticalSection(&cond->lock); in evthread_win32_cond_wait()
292 LeaveCriticalSection(&cond->lock); in evthread_win32_cond_wait()