Searched refs:sl (Results 1 – 2 of 2) sorted by relevance
1751 #define INITIAL_LOCK(sl) ((sl)->threadid = 0, (sl)->l = (sl)->c = 0, 0) argument1752 #define ACQUIRE_LOCK(sl) pthread_acquire_lock(sl) argument1753 #define RELEASE_LOCK(sl) pthread_release_lock(sl) argument1754 #define TRY_LOCK(sl) pthread_try_lock(sl) argument1759 static FORCEINLINE int pthread_acquire_lock (MLOCK_T *sl) { in pthread_acquire_lock() argument1761 volatile unsigned int* lp = &sl->l; in pthread_acquire_lock()1764 if (sl->threadid == CURRENT_THREAD) { in pthread_acquire_lock()1765 ++sl->c; in pthread_acquire_lock()1779 assert(!sl->threadid); in pthread_acquire_lock()1780 sl->threadid = CURRENT_THREAD; in pthread_acquire_lock()[all …]
1458 static int win32_acquire_lock (MLOCK_T *sl) { in win32_acquire_lock() argument1461 if (!InterlockedCompareExchange(sl, 1, 0)) in win32_acquire_lock()1464 if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0)) in win32_acquire_lock()1471 static void win32_release_lock (MLOCK_T *sl) { in win32_release_lock() argument1472 InterlockedExchange (sl, 0); in win32_release_lock()