|
Scopira
20080306
|
#include <mutex_pthreads.h>
Public Member Functions | |
| mutex (void) | |
| basi | |
| void | lock (void) |
| void | unlock (void) |
| bool | try_lock (void) |
| pthread_mutex_t * | get_os_mutex (void) |
| mutex (void) | |
| basi | |
| void | lock (void) |
| void | unlock (void) |
| bool | try_lock (void) |
| QMutex * | get_os_mutex (void) |
Protected Attributes | |
| pthread_mutex_t | dm_mut |
| QMutex | dm_mut |
A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.
|
inline |
Returns the internal operating system primitive.
|
inline |
Returns the internal operating system primitive.
|
inline |
Aquires and locks the mutex. The call blocks if its locked by another thread.
|
inline |
Aquires and locks the mutex. The call blocks if its locked by another thread.
Referenced by scopira::tool::locker::locker(), and scopira::tool::locker_ptr< T >::locker_ptr().
|
inline |
|
inline |
|
inline |
Unlocks a previously locked mutex. Always make sure you match your locks and unlocks (use the locker utility for help)
|
inline |
Unlocks a previously locked mutex. Always make sure you match your locks and unlocks (use the locker utility for help)
Referenced by scopira::tool::locker::~locker(), and scopira::tool::locker_ptr< T >::~locker_ptr().