summaryrefslogtreecommitdiffstats
path: root/include/asm-i386/local.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-31 02:30:49 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 12:18:55 -0800
commit2cf8d82d63807c2c68adf20bb28bf502496186dd (patch)
tree13cafaa87dafa639f3876bcda6d302266a349c88 /include/asm-i386/local.h
parent09ce3512dcad0ad1d07eee0dc5ebb6d037c39c16 (diff)
downloadop-kernel-dev-2cf8d82d63807c2c68adf20bb28bf502496186dd.zip
op-kernel-dev-2cf8d82d63807c2c68adf20bb28bf502496186dd.tar.gz
[PATCH] make local_t signed
local_t's were defined to be unsigned. This increases confusion because atomic_t's are signed. The patch goes through and changes all implementations to use signed longs throughout. Also, x86-64 was using 32-bit quantities for the value passed into local_add() and local_sub(). Fixed. All (actually, both) existing users have been audited. (Also s/__inline__/inline/ in x86_64/local.h) Cc: Andi Kleen <ak@muc.de> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/local.h')
-rw-r--r--include/asm-i386/local.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h
index 0177da8..e67fa08 100644
--- a/include/asm-i386/local.h
+++ b/include/asm-i386/local.h
@@ -5,7 +5,7 @@
typedef struct
{
- volatile unsigned long counter;
+ volatile long counter;
} local_t;
#define LOCAL_INIT(i) { (i) }
@@ -29,7 +29,7 @@ static __inline__ void local_dec(local_t *v)
:"m" (v->counter));
}
-static __inline__ void local_add(unsigned long i, local_t *v)
+static __inline__ void local_add(long i, local_t *v)
{
__asm__ __volatile__(
"addl %1,%0"
@@ -37,7 +37,7 @@ static __inline__ void local_add(unsigned long i, local_t *v)
:"ir" (i), "m" (v->counter));
}
-static __inline__ void local_sub(unsigned long i, local_t *v)
+static __inline__ void local_sub(long i, local_t *v)
{
__asm__ __volatile__(
"subl %1,%0"
OpenPOWER on IntegriCloud