Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
shared_mutex_base Class Reference

#include <shared_mutex.hpp>

Inheritance diagram for shared_mutex_base:

Public Member Functions

 shared_mutex_base ()
 
 ~shared_mutex_base ()
 
 shared_mutex_base (const shared_mutex_base &)=delete
 
shared_mutex_baseoperator= (const shared_mutex_base &)=delete
 
bool try_lock ()
 
void unlock ()
 
void lock_shared ()
 
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_
 

Static Protected Attributes

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

Member Typedef Documentation

◆ cond_t

typedef std::condition_variable cond_t
protected

◆ count_t

typedef unsigned count_t
protected

◆ mutex_t

typedef std::mutex mutex_t
protected

Constructor & Destructor Documentation

◆ shared_mutex_base() [1/2]

shared_mutex_base ( )
inline

◆ ~shared_mutex_base()

~shared_mutex_base ( )
inline

◆ shared_mutex_base() [2/2]

shared_mutex_base ( const shared_mutex_base )
delete

Member Function Documentation

◆ lock_shared()

void lock_shared ( )
inline

◆ operator=()

shared_mutex_base & operator= ( const shared_mutex_base )
delete

◆ try_lock()

bool try_lock ( )
inline

◆ try_lock_shared()

bool try_lock_shared ( )
inline

◆ unlock()

void unlock ( )
inline

Member Data Documentation

◆ gate1_

cond_t gate1_
protected

◆ mut_

mutex_t mut_
protected

◆ n_readers_

const count_t n_readers_ = ~write_entered_
staticprotected

◆ state_

count_t state_
protected

◆ write_entered_

const count_t write_entered_ = 1U << (sizeof(count_t) * CHAR_BIT - 1)
staticprotected

The documentation for this class was generated from the following file: