IBR-DTNSuite  0.8
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

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

Definition at line 87 of file Mutex.cpp.

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

Implements ibrcommon::MutexInterface.

Definition at line 39 of file Mutex.cpp.

References m_mutex.

Referenced by dtn::storage::DataStorage::istream::istream().

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

Implements ibrcommon::MutexInterface.

Definition at line 77 of file Mutex.cpp.

References m_mutex.

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

Implements ibrcommon::MutexInterface.

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: