Public Types | Public Member Functions | Protected Attributes

ibrcommon::Mutex Class Reference

#include <Mutex.h>

Inherited by dtn::core::AbstractWorker, ibrcommon::BLOB, ibrcommon::BLOB::Reference, and ibrcommon::Conditional.

List of all members.

Public Types

enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }

Public Member Functions

 Mutex (MUTEX_TYPE type=MUTEX_ERRORCHECK)
virtual ~Mutex ()
virtual void trylock () throw (MutexException)
virtual void enter () throw (MutexException)
virtual void leave () throw (MutexException)

Protected Attributes

pthread_mutex_t m_mutex

Detailed Description

Definition at line 17 of file Mutex.h.


Member Enumeration Documentation

Enumerator:
MUTEX_NORMAL 
MUTEX_RECURSIVE 
MUTEX_ERRORCHECK 

Definition at line 20 of file Mutex.h.


Constructor & Destructor Documentation

ibrcommon::Mutex::Mutex ( MUTEX_TYPE  type = MUTEX_ERRORCHECK  ) 

Definition at line 7 of file Mutex.cpp.

References m_mutex.

ibrcommon::Mutex::~Mutex (  )  [virtual]

Definition at line 16 of file Mutex.cpp.

References m_mutex.


Member Function Documentation

void ibrcommon::Mutex::enter (  )  throw (MutexException) [virtual]

Reimplemented in ibrcommon::BLOB::Reference.

Definition at line 36 of file Mutex.cpp.

References m_mutex.

Referenced by ibrcommon::BLOB::Reference::enter(), and ibrcommon::MutexLock::MutexLock().

void ibrcommon::Mutex::leave (  )  throw (MutexException) [virtual]

Reimplemented in ibrcommon::BLOB::Reference.

Definition at line 74 of file Mutex.cpp.

References m_mutex.

Referenced by ibrcommon::BLOB::Reference::leave(), and ibrcommon::MutexLock::~MutexLock().

void ibrcommon::Mutex::trylock (  )  throw (MutexException) [virtual]

Reimplemented in ibrcommon::BLOB::Reference.

Definition at line 21 of file Mutex.cpp.

References m_mutex.

Referenced by ibrcommon::BLOB::Reference::trylock().


Member Data Documentation

pthread_mutex_t ibrcommon::Mutex::m_mutex [protected]

Definition at line 35 of file Mutex.h.

Referenced by enter(), leave(), Mutex(), trylock(), and ~Mutex().


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