Add C++ wrappers for pthread mutex and rcu read lock
Add two wrappers that are similar and provide the "Mutex" named
requirements[1] around pthread_mutex_t and liburcu's RCU reader lock.
In both cases, the intention is to either use the `mutex` or `read_lock`
interface with the standard concurrency support library (e.g. std::lock,
etc.) or, more likely, use the lock_guard wrappers.
The lock_guard[2] wrappers make it easier to convert existing code to be
exception-safe and generally makes the use of those locks less
error-prone.
[1] https://en.cppreference.com/w/cpp/named_req/Mutex
[2] https://en.cppreference.com/w/cpp/thread/lock_guard
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I26cfc2e954d1d4cc1f7e0973cdcd1b9881ef181a
This page took 0.025359 seconds and 4 git commands to generate.