4 #define MFENCE() __sync_synchronize()
5 #define BARRIER() __asm__ __volatile__ ("" : "memory")
6 #define __pause() __asm__ __volatile__ ("pause\n");
15 static inline unsigned long xq_acquire(struct xq_lock *lock, unsigned long nr)
17 unsigned long __serial;
19 for (; *(volatile unsigned long *)(&lock->lock); )
22 if (!__sync_fetch_and_sub(&lock->lock, 1))
26 __serial = lock->serial;
31 static inline void xq_release(struct xq_lock *lock)