[PATCH] atomic: cmpxchg
[linux-3.10.git] / include / asm-frv / atomic.h
index e7596846342879c7bcaa21c1b082a3d3bc07b27b..55f06a0e949f57046869dc0174ea6fb2d25441a7 100644 (file)
@@ -414,4 +414,6 @@ extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new);
 
 #endif
 
+#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+
 #endif /* _ASM_ATOMIC_H */