diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-03-29 19:47:32 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-03-30 17:48:59 +0000 |
commit | 4da9f131a74d12de56c44da6d522a9116da06805 (patch) | |
tree | 920ca1331e8d1a4658fb44269c4d6ebbbc30a390 /include | |
parent | a2d33807061133c8bb5cf515eec16e6900f26bc6 (diff) | |
download | blackbird-op-linux-4da9f131a74d12de56c44da6d522a9116da06805.tar.gz blackbird-op-linux-4da9f131a74d12de56c44da6d522a9116da06805.zip |
[PARISC] Add atomic_sub_and_test
Define atomic_sub_and_test to fix build failures.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-parisc/atomic.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 4dc7253ff5d0..403ea97316cf 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h @@ -210,6 +210,8 @@ static __inline__ int atomic_read(const atomic_t *v) #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) +#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) + #define ATOMIC_INIT(i) ((atomic_t) { (i) }) #define smp_mb__before_atomic_dec() smp_mb() @@ -267,6 +269,7 @@ atomic64_read(const atomic64_t *v) #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) +#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) #endif /* __LP64__ */ |