Lines Matching refs:global_init_lock
138 static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER; variable
151 static volatile LPCRITICAL_SECTION global_init_lock = NULL; variable
158 static int32 global_init_lock = -1; variable
436 pthread_mutex_lock(&global_init_lock); in __xmlGlobalInitMutexLock()
441 if (global_init_lock == NULL) { in __xmlGlobalInitMutexLock()
452 InterlockedCompareExchangePointer((void **) &global_init_lock, in __xmlGlobalInitMutexLock()
455 InterlockedCompareExchange((void **) &global_init_lock, in __xmlGlobalInitMutexLock()
462 if (global_init_lock != cs) { in __xmlGlobalInitMutexLock()
469 EnterCriticalSection(global_init_lock); in __xmlGlobalInitMutexLock()
476 while (global_init_lock == -1) { in __xmlGlobalInitMutexLock()
478 global_init_lock = sem; in __xmlGlobalInitMutexLock()
488 if (global_init_lock != sem) in __xmlGlobalInitMutexLock()
492 if (acquire_sem(global_init_lock) != B_NO_ERROR) { in __xmlGlobalInitMutexLock()
509 pthread_mutex_unlock(&global_init_lock); in __xmlGlobalInitMutexUnlock()
511 if (global_init_lock != NULL) { in __xmlGlobalInitMutexUnlock()
512 LeaveCriticalSection(global_init_lock); in __xmlGlobalInitMutexUnlock()
515 release_sem(global_init_lock); in __xmlGlobalInitMutexUnlock()
530 if (global_init_lock != NULL) { in __xmlGlobalInitMutexDestroy()
531 DeleteCriticalSection(global_init_lock); in __xmlGlobalInitMutexDestroy()
532 free(global_init_lock); in __xmlGlobalInitMutexDestroy()
533 global_init_lock = NULL; in __xmlGlobalInitMutexDestroy()