]> git.hungrycats.org Git - linux/commitdiff
[PATCH] explicit signed char cast in i386 spin_is_locked
authorChristoph Hellwig <hch@lst.de>
Thu, 1 Aug 2002 05:23:21 +0000 (22:23 -0700)
committerChristoph Hellwig <hch@sb.bsdonline.org>
Thu, 1 Aug 2002 05:23:21 +0000 (22:23 -0700)
To make spinlock debugging work with -funsigned-char the i386 version
of spin_is_locked() needs to cast to signed char explicitly instead of
just char.  XFS needed -funsigned-char (and currently still has it),
but it doesn't evert hurt.

include/asm-i386/spinlock.h

index 678a64fed800ac6982ced23ebb43b3e6f4779079..d565c78c2d81eeb4123db8beb46cecfc37055f20 100644 (file)
@@ -39,7 +39,7 @@ typedef struct {
  * 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 \