#include <SXMutex.h>
Public Member Functions | |
SXMutexGuard (SXMutex &mx, bool initially_locked=true) | |
~SXMutexGuard () | |
void | lock () |
void | unlock () |
bool | locked () const |
operator const void * () const | |
Private Attributes | |
SXMutex & | rwLock |
bool | m_locked |
Models the boost::ScopedLock concept. Template parameter LockMode determines the semantics of this lock; the NOWAIT modes may not be used.
Definition at line 102 of file SXMutex.h.
SXMutexGuard< lockMode >::SXMutexGuard | ( | SXMutex & | mx, | |
bool | initially_locked = true | |||
) | [inline, explicit] |
SXMutexGuard< lockMode >::~SXMutexGuard | ( | ) | [inline] |
Definition at line 116 of file SXMutex.h.
References SXMutexGuard< lockMode >::m_locked, and SXMutexGuard< lockMode >::unlock().
void SXMutexGuard< lockMode >::lock | ( | ) | [inline] |
Definition at line 123 of file SXMutex.h.
References SXMutexGuard< lockMode >::m_locked, SXMutexGuard< lockMode >::rwLock, and SXMutex::waitFor().
Referenced by SXMutexGuard< lockMode >::SXMutexGuard(), and PagingTestBase::testThreadedOp().
void SXMutexGuard< lockMode >::unlock | ( | ) | [inline] |
Definition at line 130 of file SXMutex.h.
References SXMutexGuard< lockMode >::m_locked, SXMutex::release(), and SXMutexGuard< lockMode >::rwLock.
Referenced by CacheImpl< PageT, VictimPolicyT >::isPageMapped(), CacheImpl< PageT, VictimPolicyT >::mapPage(), FtrsTableWriterExecStream::open(), CheckpointThread::run(), PagingTestBase::testCheckpointGuarded(), and SXMutexGuard< lockMode >::~SXMutexGuard().
bool SXMutexGuard< lockMode >::locked | ( | ) | const [inline] |
Definition at line 137 of file SXMutex.h.
References SXMutexGuard< lockMode >::m_locked.
00138 { 00139 return m_locked; 00140 }
SXMutexGuard< lockMode >::operator const void * | ( | ) | const [inline] |
Definition at line 142 of file SXMutex.h.
References SXMutexGuard< lockMode >::m_locked.
00143 { 00144 return m_locked ? this : 0; 00145 }
SXMutex& SXMutexGuard< lockMode >::rwLock [private] |
Definition at line 104 of file SXMutex.h.
Referenced by SXMutexGuard< lockMode >::lock(), and SXMutexGuard< lockMode >::unlock().
bool SXMutexGuard< lockMode >::m_locked [private] |
Definition at line 105 of file SXMutex.h.
Referenced by SXMutexGuard< lockMode >::lock(), SXMutexGuard< lockMode >::locked(), SXMutexGuard< lockMode >::operator const void *(), SXMutexGuard< lockMode >::unlock(), and SXMutexGuard< lockMode >::~SXMutexGuard().