aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/include/asm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv/include/asm/atomic.h')
-rw-r--r--arch/frv/include/asm/atomic.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h
index fae32c7fdcb6..0d8a7d661740 100644
--- a/arch/frv/include/asm/atomic.h
+++ b/arch/frv/include/asm/atomic.h
@@ -241,7 +241,7 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v);
241#define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) 241#define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter))
242#define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter)) 242#define atomic64_xchg(v, new) (__xchg_64(new, &(v)->counter))
243 243
244static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) 244static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
245{ 245{
246 int c, old; 246 int c, old;
247 c = atomic_read(v); 247 c = atomic_read(v);
@@ -253,10 +253,8 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
253 break; 253 break;
254 c = old; 254 c = old;
255 } 255 }
256 return c != (u); 256 return c;
257} 257}
258 258
259#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
260 259
261#include <asm-generic/atomic-long.h>
262#endif /* _ASM_ATOMIC_H */ 260#endif /* _ASM_ATOMIC_H */