diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-14 05:40:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-14 05:40:23 -0700 |
| commit | 2a43abd30975cd72080363cd8b505247dbb225a9 (patch) | |
| tree | ab80cbc6c39a502d08ac5106f7af7c418d26329d /include | |
| parent | bcd599c68c534f3c64f5d07175b465c6a95a913b (diff) | |
[PATCH] sparc64: implement atomic_add_negative()
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-sparc64/atomic.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index aac3db2dcdbc..5374f5b72f4f 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h @@ -62,6 +62,9 @@ extern int __atomic64_sub(__s64, atomic64_t *); #define atomic_dec(v) ((void)__atomic_sub(1, v)) #define atomic64_dec(v) ((void)__atomic64_sub(1, v)) +#define atomic_add_negative(i, v) (__atomic_add(i, v) < 0) +#define atomic64_add_negative(i, v) (__atomic64_add(i, v) < 0) + /* Atomic operations are already serializing */ #define smp_mb__before_atomic_dec() barrier() #define smp_mb__after_atomic_dec() barrier() |
