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. | |
The implementation for these functions must be provided on all platforms that BloCxx is avaliable for. It is essentially an abstraction layer over another mutex implementation.
| 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.
| handle | The mutex to acquire. |
Definition at line 187 of file MutexImpl.cpp.
References BLOCXX_NAMESPACE::Mutex_t::mutex, and BLOCXX_NAMESPACE::ThreadImpl::testCancel().
| int BLOCXX_NAMESPACE::MutexImpl::createMutex | ( | Mutex_t & | handle | ) |
Create a platform specific mutext handle.
| handle | The mutex handle that should be initialized by this method |
| handle | The mutex handle that should be initialized by this method | |
| isRecursive | Specified whether to create a recursive mutex |
Definition at line 60 of file MutexImpl.cpp.
References BLOCXX_NAMESPACE::Mutex_t::mutex, and PTHREAD_COND_ATTR_DEFAULT.
Referenced by BLOCXX_NAMESPACE::Mutex::Mutex().
| int BLOCXX_NAMESPACE::MutexImpl::destroyMutex | ( | Mutex_t & | handle | ) |
Destroy a mutex previously created with createMutex.
| handle | The handle to the mutex that will be destroyed. |
Definition at line 158 of file MutexImpl.cpp.
References BLOCXX_NAMESPACE::Mutex_t::mutex.
| int BLOCXX_NAMESPACE::MutexImpl::releaseMutex | ( | Mutex_t & | handle | ) |
Release a mutex that was previously acquired with the acquireMutex method.
| handle | The handle to the mutex that is being released. |
Definition at line 236 of file MutexImpl.cpp.
References BLOCXX_NAMESPACE::Mutex_t::mutex.
Referenced by BLOCXX_NAMESPACE::Mutex::release().
1.5.6