blocxx
BLOCXX_NAMESPACE::NonRecursiveMutex Class Reference

Note that descriptions of what exceptions may be thrown assumes that object is used correctly, i.e., method preconditions are satisfied. More...

#include <NonRecursiveMutex.hpp>

Public Member Functions

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

Private Member Functions

 NonRecursiveMutex (const NonRecursiveMutex &)
 
NonRecursiveMutexoperator= (const NonRecursiveMutex &)
 
void conditionPreWait (NonRecursiveMutexLockState &state)
 
void conditionPostWait (NonRecursiveMutexLockState &state)
 

Private Attributes

NonRecursiveMutex_t m_mutex
 

Friends

class Condition
 

Detailed Description

Note that descriptions of what exceptions may be thrown assumes that object is used correctly, i.e., method preconditions are satisfied.

Definition at line 52 of file NonRecursiveMutex.hpp.

Constructor & Destructor Documentation

◆ NonRecursiveMutex() [1/2]

BLOCXX_NAMESPACE::NonRecursiveMutex::NonRecursiveMutex ( )

Create a new NonRecursiveMutex object.

Exceptions
Exceptionif needed system resources exhausted

Definition at line 53 of file NonRecursiveMutex.cpp.

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

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

◆ ~NonRecursiveMutex()

BLOCXX_NAMESPACE::NonRecursiveMutex::~NonRecursiveMutex ( )

◆ NonRecursiveMutex() [2/2]

BLOCXX_NAMESPACE::NonRecursiveMutex::NonRecursiveMutex ( const NonRecursiveMutex & )
private

References NonRecursiveMutex().

Member Function Documentation

◆ acquire()

void BLOCXX_NAMESPACE::NonRecursiveMutex::acquire ( )

Acquire ownership of this NonRecursiveMutex object.

This call will block if another thread has ownership of this NonRecursiveMutex. When it returns, the current thread will be the owner of this NonRecursiveMutex object. If this thread is the owner of the mutex, then an Deadlock exception will be thrown.

Precondition
Mutex not currently locked by this thread.
Exceptions
noexception

Definition at line 69 of file NonRecursiveMutex.cpp.

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

◆ conditionPostWait()

void BLOCXX_NAMESPACE::NonRecursiveMutex::conditionPostWait ( NonRecursiveMutexLockState & state)
private
Exceptions
noexception

Definition at line 97 of file NonRecursiveMutex.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::NonRecursiveMutexImpl::conditionPostWait(), and m_mutex.

Referenced by Condition.

◆ conditionPreWait()

void BLOCXX_NAMESPACE::NonRecursiveMutex::conditionPreWait ( NonRecursiveMutexLockState & state)
private
Exceptions
noexception

Definition at line 89 of file NonRecursiveMutex.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::NonRecursiveMutexImpl::conditionPreWait(), and m_mutex.

Referenced by Condition.

◆ operator=()

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

References NonRecursiveMutex().

◆ release()

bool BLOCXX_NAMESPACE::NonRecursiveMutex::release ( )

Release ownership of this NonRecursiveMutex object.

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

Precondition
Mutex currently locked by this thread.
Exceptions
noexception

Definition at line 79 of file NonRecursiveMutex.cpp.

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

Friends And Related Symbol Documentation

◆ Condition

friend class Condition
friend

Definition at line 88 of file NonRecursiveMutex.hpp.

References Condition, conditionPostWait(), and conditionPreWait().

Referenced by Condition.

Member Data Documentation

◆ m_mutex

NonRecursiveMutex_t BLOCXX_NAMESPACE::NonRecursiveMutex::m_mutex
private

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