Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1ada601 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

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: default avatarAnton Blanchard <anton@samba.org>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 6c15d7af
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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