patch-2.3.45 linux/include/asm-ppc/spinlock.h

Next file: linux/include/asm-ppc/types.h
Previous file: linux/include/asm-ppc/softirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.44/linux/include/asm-ppc/spinlock.h linux/include/asm-ppc/spinlock.h
@@ -14,6 +14,7 @@
 #define SPIN_LOCK_UNLOCKED	(spinlock_t) { 0, 0, 0 }
 #define spin_lock_init(lp) 	do { (lp)->lock = 0; } while(0)
 #define spin_unlock_wait(lp)	do { barrier(); } while((lp)->lock)
+#define spin_is_locked(x)	((x)->lock != 0)
 
 extern void _spin_lock(spinlock_t *lock);
 extern void _spin_unlock(spinlock_t *lock);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)