diff options
author | Anton Blanchard <anton@samba.org> | 2012-02-29 16:09:53 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-07 01:06:08 -0500 |
commit | b1ada6010e234d6c53bfcd5a617610c9284846b8 (patch) | |
tree | 158a68c8c224e3333f4e786764656e6d18c6d965 /include/linux/atomic.h | |
parent | 6c15d7afbb2f9e2d3114b513306dae736b56f535 (diff) |
atomic: Allow atomic_inc_not_zero to be overridden
We want to implement a ppc64 specific version of atomic_inc_not_zero
so wrap it in an ifdef to allow it to be overridden.
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/linux/atomic.h')
-rw-r--r-- | include/linux/atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index 42b77b5446d2..70cfcb2d63c4 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -24,7 +24,9 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
24 | * Atomically increments @v by 1, so long as @v is non-zero. | 24 | * Atomically increments @v by 1, so long as @v is non-zero. |
25 | * Returns non-zero if @v was non-zero, and zero otherwise. | 25 | * Returns non-zero if @v was non-zero, and zero otherwise. |
26 | */ | 26 | */ |
27 | #ifndef atomic_inc_not_zero | ||
27 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 28 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
29 | #endif | ||
28 | 30 | ||
29 | /** | 31 | /** |
30 | * atomic_inc_not_zero_hint - increment if not null | 32 | * atomic_inc_not_zero_hint - increment if not null |