IBR-DTNSuite 0.6

ibrcommon::Mutex Class Reference

#include <Mutex.h>

Inheritance diagram for ibrcommon::Mutex:
Collaboration diagram for ibrcommon::Mutex:

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_NORMAL)
virtual ~Mutex ()
virtual void trylock () throw (MutexException)
virtual void enter () throw (MutexException)
virtual void leave () throw (MutexException)

Static Public Member Functions

static MutexInterfacedummy ()

Protected Attributes

pthread_mutex_t m_mutex
pthread_mutexattr_t m_attr

Detailed Description

Definition at line 38 of file Mutex.h.


Member Enumeration Documentation

Enumerator:
MUTEX_NORMAL 
MUTEX_RECURSIVE 
MUTEX_ERRORCHECK 

Definition at line 41 of file Mutex.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file Mutex.cpp.

References m_attr, and m_mutex.

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

Definition at line 18 of file Mutex.cpp.

References m_attr, and m_mutex.


Member Function Documentation

MutexInterface & ibrcommon::Mutex::dummy ( ) [static]

Definition at line 87 of file Mutex.cpp.

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

Implements ibrcommon::MutexInterface.

Reimplemented in ibrcommon::BLOB::Reference.

Definition at line 77 of file Mutex.cpp.

References m_mutex.

Referenced by dtn::core::SQLiteBundleStorage::leave().

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

Implements ibrcommon::MutexInterface.

Reimplemented in ibrcommon::BLOB::Reference.

Definition at line 24 of file Mutex.cpp.

References m_mutex.


Member Data Documentation

pthread_mutexattr_t ibrcommon::Mutex::m_attr [protected]

Definition at line 59 of file Mutex.h.

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

pthread_mutex_t ibrcommon::Mutex::m_mutex [protected]

Definition at line 58 of file Mutex.h.

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


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