diff options
| -rw-r--r-- | arch/sparc/include/asm/atomic_64.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index abad97edf736..28db058d471b 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h | |||
| @@ -83,7 +83,11 @@ ATOMIC_OPS(xor) | |||
| 83 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, v) < 0) | 83 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, v) < 0) |
| 84 | 84 | ||
| 85 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) | 85 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) |
| 86 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 86 | |
| 87 | static inline int atomic_xchg(atomic_t *v, int new) | ||
| 88 | { | ||
| 89 | return xchg(&v->counter, new); | ||
| 90 | } | ||
| 87 | 91 | ||
| 88 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) | 92 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
| 89 | { | 93 | { |
