Hall-D Software
alpha
|
#include <ReadWriteLock.h>
Public Member Functions | |
MutexLock (T &m, std::function< int(T &)> &lock, std::function< int(T &)> &unlock) | |
Construct and lock mutex. More... | |
virtual | ~MutexLock () |
Destruct and unlock mutex. More... | |
virtual int | lock () |
Explicitly lock mutex, need to make sure you do not get into racing condition. More... | |
virtual int | unlock () |
Explicitly unlock existing mutex. More... | |
virtual T & | getLock () |
Static Public Member Functions | |
static int | initFunctions () |
Static Public Attributes | |
static bool | functionsAreInitialized |
static std::function< int(pthread_mutex_t &)> | plainLockLock |
static std::function< int(pthread_mutex_t &)> | plainLockUnlock |
static std::function< int(pthread_rwlock_t &)> | readLockLock |
static std::function< int(pthread_rwlock_t &)> | readLockUnock |
static std::function< int(pthread_rwlock_t &)> | writeLockLock |
static std::function< int(pthread_rwlock_t &)> | writeLockUnlock |
Protected Attributes | |
T & | m_ |
std::function< int(T &)> | lockFunc |
std::function< int(T &)> | unlockFunc |
Definition at line 61 of file ReadWriteLock.h.
|
inline |
Construct and lock mutex.
Definition at line 69 of file ReadWriteLock.h.
Destruct and unlock mutex.
Definition at line 75 of file ReadWriteLock.h.
|
inlinevirtual |
Definition at line 86 of file ReadWriteLock.h.
|
inlinestaticinherited |
Definition at line 29 of file ReadWriteLock.h.
References MutexLockBase::functionsAreInitialized, MutexLockBase::plainLockLock, MutexLockBase::plainLockUnlock, MutexLockBase::readLockLock, MutexLockBase::readLockUnock, MutexLockBase::writeLockLock, and MutexLockBase::writeLockUnlock.
Referenced by MutexLockBase::MutexLockBase().
|
inlinevirtual |
Explicitly lock mutex, need to make sure you do not get into racing condition.
Definition at line 79 of file ReadWriteLock.h.
|
inlinevirtual |
Explicitly unlock existing mutex.
Definition at line 83 of file ReadWriteLock.h.
|
staticinherited |
Definition at line 20 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions(), and MutexLockBase::MutexLockBase().
|
protected |
Definition at line 64 of file ReadWriteLock.h.
Referenced by MutexLock< pthread_mutex_t >::lock(), and MutexLock< pthread_mutex_t >::MutexLock().
|
protected |
Definition at line 63 of file ReadWriteLock.h.
Referenced by MutexLock< pthread_mutex_t >::getLock(), MutexLock< pthread_mutex_t >::lock(), MutexLock< pthread_mutex_t >::MutexLock(), MutexLock< pthread_mutex_t >::unlock(), and MutexLock< pthread_mutex_t >::~MutexLock().
|
staticinherited |
Definition at line 48 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().
|
staticinherited |
Definition at line 49 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().
|
staticinherited |
Definition at line 51 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().
|
staticinherited |
Definition at line 52 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().
|
protected |
Definition at line 65 of file ReadWriteLock.h.
Referenced by MutexLock< pthread_mutex_t >::unlock(), and MutexLock< pthread_mutex_t >::~MutexLock().
|
staticinherited |
Definition at line 54 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().
|
staticinherited |
Definition at line 55 of file ReadWriteLock.h.
Referenced by MutexLockBase::initFunctions().