171 |
|
static pthread_mutex_t vosf_lock = PTHREAD_MUTEX_INITIALIZER; // Mutex to protect frame buffer (dirtyPages in fact) |
172 |
|
#define LOCK_VOSF pthread_mutex_lock(&vosf_lock); |
173 |
|
#define UNLOCK_VOSF pthread_mutex_unlock(&vosf_lock); |
174 |
+ |
#elif defined(HAVE_SPINLOCKS) |
175 |
+ |
static spinlock_t vosf_lock = SPIN_LOCK_UNLOCKED; // Mutex to protect frame buffer (dirtyPages in fact) |
176 |
+ |
#define LOCK_VOSF spin_lock(&vosf_lock) |
177 |
+ |
#define UNLOCK_VOSF spin_unlock(&vosf_lock) |
178 |
|
#else |
179 |
|
#define LOCK_VOSF |
180 |
|
#define UNLOCK_VOSF |