MySQL 8.0.40
Source Code Documentation
Shared_writelock Class Reference

#include <plugin_utils.h>

Public Member Functions

 Shared_writelock (Checkable_rwlock *arg)
 
virtual ~Shared_writelock ()
 
int try_grab_write_lock ()
 
void grab_write_lock ()
 
void release_write_lock ()
 
int try_grab_read_lock ()
 Grab a read lock only if there is no write lock acquired. More...
 
void grab_read_lock ()
 
void release_read_lock ()
 

Private Attributes

Checkable_rwlockshared_write_lock
 
mysql_mutex_t write_lock
 
mysql_cond_t write_lock_protection
 
bool write_lock_in_use
 

Constructor & Destructor Documentation

◆ Shared_writelock()

Shared_writelock::Shared_writelock ( Checkable_rwlock arg)
inline

◆ ~Shared_writelock()

virtual Shared_writelock::~Shared_writelock ( )
inlinevirtual

Member Function Documentation

◆ grab_read_lock()

void Shared_writelock::grab_read_lock ( )
inline

◆ grab_write_lock()

void Shared_writelock::grab_write_lock ( )
inline

◆ release_read_lock()

void Shared_writelock::release_read_lock ( )
inline

◆ release_write_lock()

void Shared_writelock::release_write_lock ( )
inline

◆ try_grab_read_lock()

int Shared_writelock::try_grab_read_lock ( )
inline

Grab a read lock only if there is no write lock acquired.

Return values
0read lock acquired
!=0there is a write lock acquired

◆ try_grab_write_lock()

int Shared_writelock::try_grab_write_lock ( )
inline

Member Data Documentation

◆ shared_write_lock

Checkable_rwlock* Shared_writelock::shared_write_lock
private

◆ write_lock

mysql_mutex_t Shared_writelock::write_lock
private

◆ write_lock_in_use

bool Shared_writelock::write_lock_in_use
private

◆ write_lock_protection

mysql_cond_t Shared_writelock::write_lock_protection
private

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