Lines Matching refs:global_init_lock
150 static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER; variable
163 static volatile LPCRITICAL_SECTION global_init_lock = NULL; variable
170 static int32 global_init_lock = -1; variable
445 pthread_mutex_lock(&global_init_lock); in __xmlGlobalInitMutexLock()
450 if (global_init_lock == NULL) { in __xmlGlobalInitMutexLock()
461 InterlockedCompareExchangePointer(&global_init_lock, cs, NULL); in __xmlGlobalInitMutexLock()
463 InterlockedCompareExchange((void **) &global_init_lock, in __xmlGlobalInitMutexLock()
470 if (global_init_lock != cs) { in __xmlGlobalInitMutexLock()
477 EnterCriticalSection(global_init_lock); in __xmlGlobalInitMutexLock()
484 while (global_init_lock == -1) { in __xmlGlobalInitMutexLock()
486 global_init_lock = sem; in __xmlGlobalInitMutexLock()
496 if (global_init_lock != sem) in __xmlGlobalInitMutexLock()
500 if (acquire_sem(global_init_lock) != B_NO_ERROR) { in __xmlGlobalInitMutexLock()
514 pthread_mutex_unlock(&global_init_lock); in __xmlGlobalInitMutexUnlock()
516 if (global_init_lock != NULL) { in __xmlGlobalInitMutexUnlock()
517 LeaveCriticalSection(global_init_lock); in __xmlGlobalInitMutexUnlock()
520 release_sem(global_init_lock); in __xmlGlobalInitMutexUnlock()
535 if (global_init_lock != NULL) { in __xmlGlobalInitMutexDestroy()
536 DeleteCriticalSection(global_init_lock); in __xmlGlobalInitMutexDestroy()
537 free(global_init_lock); in __xmlGlobalInitMutexDestroy()
538 global_init_lock = NULL; in __xmlGlobalInitMutexDestroy()