]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/asm-xtensa/atomic.h
Pull sn-handle-sc-powerdown into release branch
[mv-sheeva.git] / include / asm-xtensa / atomic.h
index e2ce06b101ad0096df8894faf7b360be4d66b2ad..fe105a123924207ea5769829250d4ab15faaab7b 100644 (file)
@@ -224,6 +224,7 @@ static inline int atomic_sub_return(int i, atomic_t * v)
 #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0)
 
 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 /**
  * atomic_add_unless - add unless the number is a given value