mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-14 14:33:46 +00:00
Always prefer our (inlined) spinlocks.
This commit is contained in:
parent
3fd927f404
commit
f054ce8648
@ -167,14 +167,14 @@ static inline int find_next_page_clear(int page)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PTHREADS
|
#ifdef HAVE_SPINLOCKS
|
||||||
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)
|
|
||||||
static spinlock_t vosf_lock = SPIN_LOCK_UNLOCKED; // Mutex to protect frame buffer (dirtyPages in fact)
|
static spinlock_t vosf_lock = SPIN_LOCK_UNLOCKED; // Mutex to protect frame buffer (dirtyPages in fact)
|
||||||
#define LOCK_VOSF spin_lock(&vosf_lock)
|
#define LOCK_VOSF spin_lock(&vosf_lock)
|
||||||
#define UNLOCK_VOSF spin_unlock(&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
|
#else
|
||||||
#define LOCK_VOSF
|
#define LOCK_VOSF
|
||||||
#define UNLOCK_VOSF
|
#define UNLOCK_VOSF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user