reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::RWMutex Class Reference

Wraps the readers/writers mutex implementation on your platform. More...

#include <RWMutex.hxx>

Public Member Functions

 RWMutex ()
 
 ~RWMutex ()
 
void readlock ()
 
void writelock ()
 
void lock ()
 
void unlock ()
 
unsigned int readerCount () const
 
unsigned int pendingWriterCount () const
 

Detailed Description

Wraps the readers/writers mutex implementation on your platform.

Note
A readers/writers mutex is a mutex that can be locked in two differing ways:
  • A read-lock: Prevents other threads from obtaining a write-lock, but not other read-locks.
  • A write-lock: Prevents other threads from obtaining either a read-lock or write-lock.

Usually, if a thread attempts to aquire a write-lock while read-locks are being held, this will prevent any further read-locks from being obtained, until the write-lock is aquired and released. This prevents the "writer starvation" problem.

Definition at line 28 of file RWMutex.hxx.

Constructor & Destructor Documentation

◆ RWMutex()

RWMutex::RWMutex ( )

Definition at line 58 of file RWMutex.cxx.

◆ ~RWMutex()

RWMutex::~RWMutex ( )

Definition at line 66 of file RWMutex.cxx.

Member Function Documentation

◆ lock()

void RWMutex::lock ( )

Definition at line 104 of file RWMutex.cxx.

◆ pendingWriterCount()

unsigned int RWMutex::pendingWriterCount ( ) const

Definition at line 161 of file RWMutex.cxx.

◆ readerCount()

unsigned int RWMutex::readerCount ( ) const

Definition at line 155 of file RWMutex.cxx.

◆ readlock()

void RWMutex::readlock ( )

Definition at line 72 of file RWMutex.cxx.

◆ unlock()

void RWMutex::unlock ( )

Definition at line 111 of file RWMutex.cxx.

◆ writelock()

void RWMutex::writelock ( )

Definition at line 86 of file RWMutex.cxx.


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