BLOCXX_NAMESPACE::MutexImpl Namespace Reference

The MutexImpl namespace represents the functionality needed by the blocxx Mutex class (Mutex). More...


Functions

int createMutex (Mutex_t &handle)
 Create a platform specific mutext handle.
int destroyMutex (Mutex_t &handle)
 Destroy a mutex previously created with createMutex.
int acquireMutex (Mutex_t &handle)
 Acquire the mutex specified by a given mutex handle.
int releaseMutex (Mutex_t &handle)
 Release a mutex that was previously acquired with the acquireMutex method.


Detailed Description

The MutexImpl namespace represents the functionality needed by the blocxx Mutex class (Mutex).

The implementation for these functions must be provided on all platforms that blocxx runs on. It is essentially an abstraction layer over another mutex implementation.


Function Documentation

int BLOCXX_NAMESPACE::MutexImpl::acquireMutex Mutex_t &  handle  ) 
 

Acquire the mutex specified by a given mutex handle.

This method should block until the desired mutex can be acquired. The error return value is used to indicate critical errors.

Parameters:
handle The mutex to acquire.
Returns:
0 on success. -1 indicates a critical error.

Definition at line 154 of file MutexImpl.cpp.

References BLOCXX_NAMESPACE::Mutex_t::mutex.

Referenced by BLOCXX_NAMESPACE::NonRecursiveMutex::acquire(), and BLOCXX_NAMESPACE::Mutex::acquire().

int BLOCXX_NAMESPACE::MutexImpl::createMutex Mutex_t &  handle  ) 
 

Create a platform specific mutext handle.

Parameters:
handle The mutex handle that should be initialized by this method
Returns:
0 on success. Otherwise -1.

Definition at line 55 of file MutexImpl.cpp.

References BLOCXX_NAMESPACE::Mutex_t::mutex.

Referenced by BLOCXX_NAMESPACE::Mutex::Mutex().

int BLOCXX_NAMESPACE::MutexImpl::destroyMutex Mutex_t &  handle  ) 
 

Destroy a mutex previously created with createMutex.

Parameters:
handle The handle to the mutex that will be destroyed.
Returns:
The following error codes: 0: success -1: Could not be acquired for destruction because it is currently locked. -2: All other error conditions

Definition at line 114 of file MutexImpl.cpp.

References BLOCXX_NAMESPACE::Mutex_t::mutex.

Referenced by BLOCXX_NAMESPACE::Mutex::~Mutex(), and BLOCXX_NAMESPACE::NonRecursiveMutex::~NonRecursiveMutex().

int BLOCXX_NAMESPACE::MutexImpl::releaseMutex Mutex_t &  handle  ) 
 

Release a mutex that was previously acquired with the acquireMutex method.

Parameters:
handle The handle to the mutex that is being released.
Returns:
0 on success. -1 indicates a critical error.

Definition at line 197 of file MutexImpl.cpp.

References BLOCXX_NAMESPACE::Mutex_t::mutex.

Referenced by BLOCXX_NAMESPACE::NonRecursiveMutex::release(), BLOCXX_NAMESPACE::Mutex::release(), BLOCXX_NAMESPACE::Mutex::~Mutex(), and BLOCXX_NAMESPACE::NonRecursiveMutex::~NonRecursiveMutex().


Generated on Fri Jun 16 15:39:12 2006 for blocxx by  doxygen 1.4.6