urcu/ref.h: implement urcu_ref_get_unless_zero()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Sep 2015 16:21:05 +0000 (12:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Sep 2015 16:23:38 +0000 (12:23 -0400)
commitcd21955a846566b3cd7ca77d58cd3d006f3c533a
tree39bd00046ac655c5fb098884fb4a57a54816f01c
parent54fd78efce9aeddcdc7b35151ad6744b7ee629cb
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 <mathieu.desnoyers@efficios.com>
urcu/ref.h
This page took 0.02517 seconds and 4 git commands to generate.