sessiond: add smart pointer utils for ltt_session
Add `find_session_by_id` and `find_locked_session_by_id` which return
smart pointers to ltt_session. In both cases, the smart pointers make
use of ltt_session's underlying reference counting mechanism.
In the case of `find_locked_session_by_id`, the session that is returned
is locked; it is automatically unlocked (and a reference is released)
when the pointer goes out of scope. This makes it easier to write
exception-safe code that uses the ltt_session API.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I125dc7592b8ef2de1da645029f311bf429a21767
This page took 0.027474 seconds and 5 git commands to generate.