diff options
| author | William Lee Irwin III <wli@holomorphy.com> | 2004-10-19 18:14:28 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-19 18:14:28 -0700 |
| commit | 35a764036ae511f9269e3ed6da91e1db613272be (patch) | |
| tree | 1da7f0427f3eb1b5ee9888be81368ac9b86a61f0 /include | |
| parent | d04b0ddcc3ade1b8f19ac11733db8907b3707631 (diff) | |
[PATCH] sparc32: add atomic_sub_and_test()
Add atomic_sub_and_test() to sparc32, implemented in terms of
atomic_sub_return(), so reiser4 can be simultaneously microoptimized for
x86 and made to pass compilation testing on sparc32.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-sparc/atomic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index fe210f3614c3..37f6ab601c3d 100644 --- a/include/asm-sparc/atomic.h +++ b/include/asm-sparc/atomic.h @@ -46,6 +46,7 @@ extern void atomic_set(atomic_t *, int); #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) +#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) /* This is the old 24-bit implementation. It's still used internally * by some sparc-specific code, notably the semaphore implementation. |
