]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix global lock.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 8 Sep 2023 20:51:57 +0000 (16:51 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 8 Sep 2023 20:51:57 +0000 (16:51 -0400)
cups/globals.c

index 65c8d13aeb3539a18f8f32c2fd68d9b6dae5b669..41fd595d5f2555fa126fef32ed40a5d868b01df5 100644 (file)
@@ -63,11 +63,7 @@ static void          cups_globals_init(void);
 void
 _cupsGlobalLock(void)
 {
-#ifdef HAVE_PTHREAD_H
-  pthread_mutex_lock(&cups_global_mutex);
-#elif defined(_WIN32)
-  EnterCriticalSection(&cups_global_mutex.m_criticalSection);
-#endif /* HAVE_PTHREAD_H */
+  cupsMutexLock(&cups_global_mutex);
 }
 
 
@@ -118,11 +114,7 @@ _cupsGlobals(void)
 void
 _cupsGlobalUnlock(void)
 {
-#ifdef HAVE_PTHREAD_H
-  pthread_mutex_unlock(&cups_global_mutex);
-#elif defined(_WIN32)
-  LeaveCriticalSection(&cups_global_mutex.m_criticalSection);
-#endif /* HAVE_PTHREAD_H */
+  cupsMutexUnlock(&cups_global_mutex);
 }