aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/quartz.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-28 07:58:00 +0000
committermarha <marha@users.sourceforge.net>2011-04-28 07:58:00 +0000
commit57a879849643e79d9674198a3a77c59532fb79b4 (patch)
tree19ece2254fadb6c2077aa09098dd8a51a5578d2a /xorg-server/hw/xquartz/quartz.c
parent96d6df5da9cddedf4931bf8e17f96e242467c661 (diff)
downloadvcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.tar.gz
vcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.tar.bz2
vcxsrv-57a879849643e79d9674198a3a77c59532fb79b4.zip
xserver xkeyboard-config mesa git update 28 Apr 2011
Diffstat (limited to 'xorg-server/hw/xquartz/quartz.c')
-rw-r--r--xorg-server/hw/xquartz/quartz.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index 4b72a89d3..0e71d3629 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -62,7 +62,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
-#include <pthread.h>
+#include <libkern/OSAtomic.h>
#include <signal.h>
#include <rootlessCommon.h>
@@ -279,10 +279,10 @@ static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
static void QuartzScreenSaver(int state) {
static CFRunLoopTimerRef pokeActivityTimer = NULL;
static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL };
- static pthread_mutex_t pokeActivityMutex = PTHREAD_MUTEX_INITIALIZER;
+ static OSSpinLock pokeActivitySpinLock = OS_SPINLOCK_INIT;
+
+ OSSpinLockLock(&pokeActivitySpinLock);
- pthread_mutex_lock(&pokeActivityMutex);
-
if(state) {
if(pokeActivityTimer == NULL)
goto QuartzScreenSaverEnd;
@@ -303,7 +303,7 @@ static void QuartzScreenSaver(int state) {
CFRunLoopAddTimer(CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes);
}
QuartzScreenSaverEnd:
- pthread_mutex_unlock(&pokeActivityMutex);
+ OSSpinLockUnlock(&pokeActivitySpinLock);
}
void QuartzShowFullscreen(int state) {