diff options
Diffstat (limited to 'include/asm-generic/atomic.h')
-rw-r--r-- | include/asm-generic/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 90e23ea90d0d..2a23da03365e 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -119,8 +119,8 @@ static inline void atomic_dec(atomic_t *v) | |||
119 | #define atomic_inc_return(v) atomic_add_return(1, (v)) | 119 | #define atomic_inc_return(v) atomic_add_return(1, (v)) |
120 | 120 | ||
121 | #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) | 121 | #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) |
122 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 122 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
123 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | 123 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
124 | 124 | ||
125 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 125 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
126 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 126 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |