blocxx
BLOCXX_NAMESPACE::Mutex Class Reference

#include <Mutex.hpp>

Public Member Functions

 Mutex ()
 Create a new recursive Mutex object.
 
 ~Mutex ()
 Destroy this Mutex object.
 
void acquire ()
 Acquire ownership of this Mutex object.
 
bool release ()
 Release ownership of this Mutex object.
 

Private Member Functions

 Mutex (const Mutex &)
 
Mutexoperator= (const Mutex &)
 

Private Attributes

Mutex_t m_mutex
 

Detailed Description

Definition at line 47 of file Mutex.hpp.

Constructor & Destructor Documentation

◆ Mutex() [1/2]

BLOCXX_NAMESPACE::Mutex::Mutex ( )

Create a new recursive Mutex object.

Definition at line 49 of file Mutex.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::MutexImpl::createMutex(), and m_mutex.

Referenced by Mutex(), and operator=().

◆ ~Mutex()

BLOCXX_NAMESPACE::Mutex::~Mutex ( )

Destroy this Mutex object.

Definition at line 56 of file Mutex.cpp.

References BLOCXX_NAMESPACE::MutexImpl::destroyMutex(), and m_mutex.

◆ Mutex() [2/2]

BLOCXX_NAMESPACE::Mutex::Mutex ( const Mutex & )
private

References Mutex().

Member Function Documentation

◆ acquire()

void BLOCXX_NAMESPACE::Mutex::acquire ( )

Acquire ownership of this Mutex object.

This call will block if another thread has ownership of this Mutex. When it returns, the current thread will be the owner of this Mutex object.

Definition at line 69 of file Mutex.cpp.

References BLOCXX_NAMESPACE::MutexImpl::acquireMutex(), BLOCXX_THROW, and m_mutex.

◆ operator=()

Mutex & BLOCXX_NAMESPACE::Mutex::operator= ( const Mutex & )
private

References Mutex().

◆ release()

bool BLOCXX_NAMESPACE::Mutex::release ( )

Release ownership of this Mutex object.

If another thread is waiting to acquire the ownership of this mutex it will stop blocking and acquire ownership when this call returns.

Definition at line 79 of file Mutex.cpp.

References BLOCXX_THROW, m_mutex, and BLOCXX_NAMESPACE::MutexImpl::releaseMutex().

Member Data Documentation

◆ m_mutex

Mutex_t BLOCXX_NAMESPACE::Mutex::m_mutex
private

Definition at line 72 of file Mutex.hpp.

Referenced by acquire(), Mutex(), release(), and ~Mutex().


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