]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/asm-powerpc/atomic.h
atomic.h: add atomic64 cmpxchg, xchg and add_unless to powerpc
[karo-tx-linux.git] / include / asm-powerpc / atomic.h
index 2ce4b6b7b34887456961fdc9227a184bcec535b8..438a7fcfba58dfd0f0a95137b952d0c85c45e6b5 100644 (file)
@@ -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))
 
 /**