From f054ce86488a1b65494a17f7c03860b516d53ec0 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sun, 4 Jan 2004 06:11:49 +0000 Subject: [PATCH] Always prefer our (inlined) spinlocks. --- BasiliskII/src/Unix/video_vosf.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BasiliskII/src/Unix/video_vosf.h b/BasiliskII/src/Unix/video_vosf.h index 5e521041..51524560 100644 --- a/BasiliskII/src/Unix/video_vosf.h +++ b/BasiliskII/src/Unix/video_vosf.h @@ -167,14 +167,14 @@ static inline int find_next_page_clear(int page) #endif } -#ifdef HAVE_PTHREADS -static pthread_mutex_t vosf_lock = PTHREAD_MUTEX_INITIALIZER; // Mutex to protect frame buffer (dirtyPages in fact) -#define LOCK_VOSF pthread_mutex_lock(&vosf_lock); -#define UNLOCK_VOSF pthread_mutex_unlock(&vosf_lock); -#elif defined(HAVE_SPINLOCKS) +#ifdef HAVE_SPINLOCKS static spinlock_t vosf_lock = SPIN_LOCK_UNLOCKED; // Mutex to protect frame buffer (dirtyPages in fact) #define LOCK_VOSF spin_lock(&vosf_lock) #define UNLOCK_VOSF spin_unlock(&vosf_lock) +#elif defined(HAVE_PTHREADS) +static pthread_mutex_t vosf_lock = PTHREAD_MUTEX_INITIALIZER; // Mutex to protect frame buffer (dirtyPages in fact) +#define LOCK_VOSF pthread_mutex_lock(&vosf_lock); +#define UNLOCK_VOSF pthread_mutex_unlock(&vosf_lock); #else #define LOCK_VOSF #define UNLOCK_VOSF