提交 b1ada601 编写于 作者: A Anton Blanchard 提交者: Benjamin Herrenschmidt

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: NAnton Blanchard <anton@samba.org>
Acked-by: NMike Frysinger <vapier@gentoo.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 6c15d7af
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册