Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlainLock Class Reference

#include <ReadWriteLock.h>

+ Inheritance diagram for PlainLock:

Public Member Functions

 PlainLock (pthread_mutex_t &m)
 
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 pthread_mutex_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

pthread_mutex_t & m_
 
std::function< int(pthread_mutex_t &)> lockFunc
 
std::function< int(pthread_mutex_t &)> unlockFunc
 

Detailed Description

Definition at line 93 of file ReadWriteLock.h.

Constructor & Destructor Documentation

PlainLock::PlainLock ( pthread_mutex_t &  m)
inline

Definition at line 95 of file ReadWriteLock.h.

Member Function Documentation

virtual pthread_mutex_t & MutexLock< pthread_mutex_t >::getLock ( )
inlinevirtualinherited

Definition at line 86 of file ReadWriteLock.h.

References MutexLock< T >::m_.

virtual int MutexLock< pthread_mutex_t >::lock ( )
inlinevirtualinherited

Explicitly lock mutex, need to make sure you do not get into racing condition.

Definition at line 79 of file ReadWriteLock.h.

References MutexLock< T >::lockFunc, and MutexLock< T >::m_.

virtual int MutexLock< pthread_mutex_t >::unlock ( )
inlinevirtualinherited

Explicitly unlock existing mutex.

Definition at line 83 of file ReadWriteLock.h.

References MutexLock< T >::m_, and MutexLock< T >::unlockFunc.

Member Data Documentation

bool MutexLockBase::functionsAreInitialized
staticinherited

Definition at line 20 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions(), and MutexLockBase::MutexLockBase().

std::function<int(pthread_mutex_t &)> MutexLock< pthread_mutex_t >::lockFunc
protectedinherited

Definition at line 64 of file ReadWriteLock.h.

pthread_mutex_t & MutexLock< pthread_mutex_t >::m_
protectedinherited

Definition at line 63 of file ReadWriteLock.h.

std::function<int(pthread_mutex_t&)> MutexLockBase::plainLockLock
staticinherited

Definition at line 48 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().

std::function<int(pthread_mutex_t&)> MutexLockBase::plainLockUnlock
staticinherited

Definition at line 49 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().

std::function<int(pthread_rwlock_t&)> MutexLockBase::readLockLock
staticinherited

Definition at line 51 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().

std::function<int(pthread_rwlock_t&)> MutexLockBase::readLockUnock
staticinherited

Definition at line 52 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().

std::function<int(pthread_mutex_t &)> MutexLock< pthread_mutex_t >::unlockFunc
protectedinherited

Definition at line 65 of file ReadWriteLock.h.

std::function<int(pthread_rwlock_t&)> MutexLockBase::writeLockLock
staticinherited

Definition at line 54 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().

std::function<int(pthread_rwlock_t&)> MutexLockBase::writeLockUnlock
staticinherited

Definition at line 55 of file ReadWriteLock.h.

Referenced by MutexLockBase::initFunctions().


The documentation for this class was generated from the following file: