Class shared_mutex_base

Inheritance Relationships

Derived Types

Class Documentation

class shared_mutex_base

Subclassed by eprosima::detail::shared_mutex< shared_mutex_type::PTHREAD_RWLOCK_PREFER_READER_NP >, eprosima::detail::shared_mutex< shared_mutex_type::PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP >

Public Functions

inline shared_mutex_base()
inline ~shared_mutex_base()
shared_mutex_base(const shared_mutex_base&) = delete
shared_mutex_base &operator=(const shared_mutex_base&) = delete
inline bool try_lock()
inline void unlock()
inline void lock_shared()
inline bool try_lock_shared()

Protected Types

typedef std::mutex mutex_t
typedef std::condition_variable cond_t
typedef unsigned count_t

Protected Attributes

mutex_t mut_
cond_t gate1_
count_t state_

Protected Static Attributes

static const count_t write_entered_ = 1U << (sizeof(count_t) * CHAR_BIT - 1)
static const count_t n_readers_ = ~write_entered_