summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-23 13:37:40 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-23 16:08:39 -0800
commit7c72aaf29621d29ed19fd68c44edb45321645049 (patch)
treee1d9db94356ccb5276c500659f8abd85942d948c /include/asm-alpha
parent7ce774b4808c019c2f143ff5dea1a1b094ff01e1 (diff)
downloadlinux-7c72aaf29621d29ed19fd68c44edb45321645049.tar.bz2
[PATCH] mm: fill arch atomic64 gaps
alpha, sparc64, x86_64 are each missing some primitives from their atomic64 support: fill in the gaps I've noticed by extrapolating asm, follow the groupings in each file. But powerpc and parisc still lack atomic64. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andi Kleen <ak@muc.de> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-alpha')
-rw-r--r--include/asm-alpha/atomic.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 36505bb4e8cb..6183eab006d4 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -118,8 +118,6 @@ static __inline__ long atomic_add_return(int i, atomic_t * v)
return result;
}
-#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
-
static __inline__ long atomic64_add_return(long i, atomic64_t * v)
{
long temp, result;
@@ -189,6 +187,9 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
})
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
+#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
+
#define atomic_dec_return(v) atomic_sub_return(1,(v))
#define atomic64_dec_return(v) atomic64_sub_return(1,(v))
@@ -199,6 +200,8 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0)
#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
+#define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0)
+
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)