From b1ada6010e234d6c53bfcd5a617610c9284846b8 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 29 Feb 2012 21:09:53 +0000 Subject: [PATCH] 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 Acked-by: Mike Frysinger Signed-off-by: Benjamin Herrenschmidt --- include/linux/atomic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/atomic.h b/include/linux/atomic.h index 42b77b5446d..70cfcb2d63c 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) * Atomically increments @v by 1, so long as @v is non-zero. * Returns non-zero if @v was non-zero, and zero otherwise. */ +#ifndef atomic_inc_not_zero #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) +#endif /** * atomic_inc_not_zero_hint - increment if not null -- 2.20.1