Add C++ wrappers for pthread mutex and rcu read lock
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 May 2022 19:16:53 +0000 (15:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:46 +0000 (16:34 -0400)
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


No differences found
This page took 0.028654 seconds and 4 git commands to generate.