Skip to contentSkip to conversation

make spin_is_locked use an explicit signed char case

PATCH New Christoph Hellwig 1 participant 1 message Jul 15, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make spin_is_locked use an explicit signed char case

This is a trivial patch from the XFS tree and allows to use spinlock debugging with code that is compiled with -funsigned-char. XFS itself shouldn't need -funsigned-char anymore, but doing the right thing in spinlock.h doesn't cost anything.

include/asm-i386/spinlock.h renamed from include/asm-i386/spinlock.h~ +1 -1
@@ -39,7 +39,7 @@
  * We make no fairness assumptions. They have a cost.
  */
 
-#define spin_is_locked(x)	(*(volatile char *)(&(x)->lock) <= 0)
+#define spin_is_locked(x)	(*(volatile signed char *)(&(x)->lock) <= 0)
 #define spin_unlock_wait(x)	do { barrier(); } while(spin_is_locked(x))
 
 #define spin_lock_string \