A simple multi-readers/single-writer spinlock (analog of std::shared_mutex).
More...
#include <spinlocks.hpp>
|
static constexpr const std::uint_fast32_t | unlocked = 0 |
|
static constexpr const std::uint_fast32_t | write_lock = 1 |
|
static constexpr const std::uint_fast32_t | read_lock = 2 |
|
template<class Backoff>
class so_5::rw_spinlock_t< Backoff >
A simple multi-readers/single-writer spinlock (analog of std::shared_mutex).
- Since
- v.5.4.0
This implementation is based on Dmitry Vyukov implementation from LLVM code base: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_mutex.cc?revision=210345&view=markup
◆ rw_spinlock_t() [1/2]
◆ rw_spinlock_t() [2/2]
◆ lock()
Lock object in exclusive mode.
◆ lock_shared()
Lock object in shared mode.
◆ operator=()
◆ unlock()
Unlock object locked in exclusive mode.
◆ unlock_shared()
Unlock object locked in shared mode.
◆ m_counters
◆ read_lock
◆ unlocked
◆ write_lock
The documentation for this class was generated from the following file: