[PATCH] mutex subsystem, add atomic_xchg() to all arches
[linux-3.10.git] / include / asm-ia64 / atomic.h
index 15cf7984c48e92849058e5f8c5a006aa1ff312c3..d3e0dfa99e1f95e224e0c175a169cf040c7a76fc 100644 (file)
@@ -89,6 +89,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
 }
 
 #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 #define atomic_add_unless(v, a, u)                             \
 ({                                                             \