ulxr::Mutex Class Reference

Supporter class for mutual exclusion of processes/threads. More...

#include <ulxr_mutex.h>

List of all members.

Public Member Functions

 Mutex ()
 Creates the mutex object.
 ~Mutex () throw ()
 Destructs mutex object.
void lock ()
 Waits for the mutex to become available.
void unlock ()
 Releases the mutex.
bool tryLock ()
 Tries to request the mutex.

Private Attributes

pthread_mutex_t handle

Classes

class  Locker
 Helper class to request and release a mutex by pure presence. More...
class  TryLocker
 Helper class to request and release a mutex by pure presence. More...


Detailed Description

Supporter class for mutual exclusion of processes/threads.

Definition at line 49 of file ulxr_mutex.h.


Constructor & Destructor Documentation

ulxr::Mutex::Mutex (  ) 

Creates the mutex object.

Definition at line 46 of file ulxr_mutex.cpp.

References handle, ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.

ulxr::Mutex::~Mutex (  )  throw ()

Destructs mutex object.

Definition at line 57 of file ulxr_mutex.cpp.

References handle.


Member Function Documentation

void ulxr::Mutex::lock (  ) 

Waits for the mutex to become available.

Definition at line 67 of file ulxr_mutex.cpp.

References ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.

Referenced by ulxr::Mutex::Locker::Locker().

void ulxr::Mutex::unlock (  ) 

Releases the mutex.

Definition at line 78 of file ulxr_mutex.cpp.

References ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.

Referenced by ulxr::Mutex::Locker::~Locker(), and ulxr::Mutex::TryLocker::~TryLocker().

bool ulxr::Mutex::tryLock (  ) 

Tries to request the mutex.

Returns:
false: the mutex was not available

Definition at line 89 of file ulxr_mutex.cpp.

Referenced by ulxr::Mutex::TryLocker::TryLocker().


Member Data Documentation

pthread_mutex_t ulxr::Mutex::handle [private]

Definition at line 125 of file ulxr_mutex.h.

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


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 20:09:06 2007 for ulxmlrpcpp by  doxygen 1.5.1