IBR-DTNSuite  0.10
ibrcommon::RWMutex Class Reference

#include <RWMutex.h>

Collaboration diagram for ibrcommon::RWMutex:
Collaboration graph

Public Types

enum  LockState { LOCK_READONLY = 0, LOCK_READWRITE = 1 }
 

Public Member Functions

 RWMutex ()
 
virtual ~RWMutex ()
 
virtual void trylock (LockState state) throw (MutexException)
 
virtual void enter (LockState state) throw (MutexException)
 
virtual void leave () throw (MutexException)
 

Protected Attributes

pthread_rwlock_t _rwlock
 

Detailed Description

Definition at line 30 of file RWMutex.h.

Member Enumeration Documentation

Enumerator
LOCK_READONLY 
LOCK_READWRITE 

Definition at line 33 of file RWMutex.h.

Constructor & Destructor Documentation

ibrcommon::RWMutex::RWMutex ( )

Definition at line 27 of file RWMutex.cpp.

References _rwlock.

ibrcommon::RWMutex::~RWMutex ( )
virtual

Definition at line 32 of file RWMutex.cpp.

References _rwlock.

Member Function Documentation

void ibrcommon::RWMutex::enter ( LockState  state) throw (MutexException)
virtual

Definition at line 62 of file RWMutex.cpp.

Referenced by ibrcommon::RWLock::RWLock().

void ibrcommon::RWMutex::leave ( ) throw (MutexException)
virtual

Definition at line 75 of file RWMutex.cpp.

References _rwlock.

Referenced by ibrcommon::RWLock::~RWLock().

void ibrcommon::RWMutex::trylock ( LockState  state) throw (MutexException)
virtual

Definition at line 37 of file RWMutex.cpp.

Member Data Documentation

pthread_rwlock_t ibrcommon::RWMutex::_rwlock
protected

Definition at line 46 of file RWMutex.h.

Referenced by leave(), RWMutex(), and ~RWMutex().


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