Skip to contentSkip to conversation

sparc32: add missing rw can_lock macros

PATCH Applied Bob Breuer 2 participants 2 messages Jun 11, 2006 – Jun 20, 2006

lore
Share & tools
lore

Bob Breuer

author
#0 lore raw

PATCH 3/4 sparc32: add missing rw can_lock macros

Fix a link failure by adding the missing can_lock macros for the rw locks.

---

include/asm-sparc/spinlock.h +3 -0
@@ -154,6 +154,9 @@ static inline int __raw_write_trylock(ra
 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
 #define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
 
+#define __raw_read_can_lock(rw) (!((rw)->lock & 0xff))
+#define __raw_write_can_lock(rw) (!(rw)->lock)
+
 #endif /* !(__ASSEMBLY__) */
 
 #endif /* __SPARC_SPINLOCK_H */