From f46e477ed94f6407982690ef53dab7898834268f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 8 May 2007 00:34:27 -0700 Subject: atomic.h: add atomic64 cmpxchg, xchg and add_unless to powerpc [akpm@linux-foundation.org: build fixes] Signed-off-by: Mathieu Desnoyers Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-powerpc/atomic.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/asm-powerpc/atomic.h') diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index 2ce4b6b7b34..438a7fcfba5 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h @@ -165,8 +165,7 @@ static __inline__ int atomic_dec_return(atomic_t *v) return t; } -#define atomic_cmpxchg(v, o, n) \ - ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) +#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) /** @@ -414,8 +413,7 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v) return t; } -#define atomic64_cmpxchg(v, o, n) \ - ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) +#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) /** -- cgit v1.2.3