Add lttng::locked_reference
A locked reference is a wrapper that allows functions to return a
protected/synchronized version of an object. My immediate use-case for
this helper is making it easier to call functions that return an
rcu-protected object (require the caller to hold the RCU reader lock for
the duration of its use of that object) in an exception safe manner.
As such, these functions can now return
lttng::locked_reference<MyType, lttng::urcu::unique_read_lock> which
ensures the RCU reader lock is held for as long as the object is used.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9f4b7f918ba01491d3de14a1a570c83586f407ae
This page took 0.02625 seconds and 5 git commands to generate.