From: Mathieu Desnoyers Date: Thu, 17 Sep 2015 16:21:05 +0000 (-0400) Subject: urcu/ref.h: implement urcu_ref_get_unless_zero() X-Git-Tag: v0.9.0~36 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=cd21955a846566b3cd7ca77d58cd3d006f3c533a;hp=cd21955a846566b3cd7ca77d58cd3d006f3c533a;p=userspace-rcu.git urcu/ref.h: implement urcu_ref_get_unless_zero() Allows getting a reference atomically if the reference count is not zero. Returns true if the reference is taken, false otherwise. This needs to be used in conjunction with another synchronization technique (e.g. RCU or mutex) to ensure existence of the reference count. Signed-off-by: Mathieu Desnoyers ---