From: Michael R Sweet Date: Fri, 8 Sep 2023 20:51:57 +0000 (-0400) Subject: Fix global lock. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e7ddf26b25829c329a65b6246551b0ee2746bbf;p=thirdparty%2Fcups.git Fix global lock. --- diff --git a/cups/globals.c b/cups/globals.c index 65c8d13aeb..41fd595d5f 100644 --- a/cups/globals.c +++ b/cups/globals.c @@ -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); }