Skip to content

Commit

Permalink
[PARISC] Add atomic_sub_and_test
Browse files Browse the repository at this point in the history
Define atomic_sub_and_test to fix build failures.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Mar 30, 2006
1 parent a2d3380 commit 4da9f13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/asm-parisc/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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__ */

Expand Down

0 comments on commit 4da9f13

Please sign in to comment.