Class that provides a wrapper for a pthread mutex. More...
#include <SPL/Runtime/Utility/Mutex.h>
List of all members.
Public Member Functions
|
| |
Mutex (pthread_mutexattr_t *attr=NULL) |
| |
Mutex (const char *name, pthread_mutexattr_t *attr=NULL) |
| void |
lock () |
| void |
unlock () |
| bool |
tryLock () |
Detailed Description
Class that provides a wrapper for a pthread mutex.
Constructor & Destructor Documentation
| SPL::Mutex::Mutex |
( |
pthread_mutexattr_t * |
attr = NULL |
) |
|
|
inline |
Constructor
- Parameters:
-
| attr |
the attributes used by pthread_mutex_init |
| SPL::Mutex::Mutex |
( |
const char * |
name, |
|
|
pthread_mutexattr_t * |
attr = NULL |
|
) |
|
|
|
inline |
Constructor
- Parameters:
-
| name |
name for this mutex |
| attr |
the attributes used by pthread_mutex_init |
Member Function Documentation
| void SPL::Mutex::lock |
( |
|
) |
|
|
inline |
| void SPL::Mutex::unlock |
( |
|
) |
|
|
inline |
| bool SPL::Mutex::tryLock |
( |
|
) |
|
|
inline |
Lock the mutex. If the mutex is already locked this call does not block.
- Returns:
- true if the mutex was locked by this call, false otherwise
The documentation for this class was generated from the following file: