lkml.org 
[lkml]   [2002]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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.


--- linux/include/asm-i386/spinlock.h~ Sun Jun 23 21:38:01 2002
+++ linux/include/asm-i386/spinlock.h Tue Jun 18 15:10:28 2002
@@ -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 \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.029 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site