aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha/atomic.h')
-rw-r--r--include/asm-alpha/atomic.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 36505bb4e8cb..6183eab006d4 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -118,8 +118,6 @@ static __inline__ long atomic_add_return(int i, atomic_t * v)
118 return result; 118 return result;
119} 119}
120 120
121#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
122
123static __inline__ long atomic64_add_return(long i, atomic64_t * v) 121static __inline__ long atomic64_add_return(long i, atomic64_t * v)
124{ 122{
125 long temp, result; 123 long temp, result;
@@ -189,6 +187,9 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
189}) 187})
190#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 188#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
191 189
190#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
191#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
192
192#define atomic_dec_return(v) atomic_sub_return(1,(v)) 193#define atomic_dec_return(v) atomic_sub_return(1,(v))
193#define atomic64_dec_return(v) atomic64_sub_return(1,(v)) 194#define atomic64_dec_return(v) atomic64_sub_return(1,(v))
194 195
@@ -199,6 +200,8 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
199#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0) 200#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0)
200 201
201#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) 202#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
203#define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0)
204
202#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) 205#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
203#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0) 206#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
204 207