The Pedigree Project
0.1
|
#include <LockManager.h>
Public Member Functions | |
LockManager () | |
~LockManager () | |
void | acquired (Semaphore &sem) |
void | released (Semaphore &sem) |
Private Attributes | |
Vector< Semaphore * > | m_Stack |
A class for managing locks. It is only used if ENFORCE_LOCK_ORDERING is defined, and expects Semaphores to notify it of acquisition and release. If a semaphore is released before one which was acquired after it, an assertion fires.
It is expected to have one LockManager per processor.
Definition at line 35 of file LockManager.h.
LockManager::LockManager | ( | ) |
Constructor
Definition at line 26 of file LockManager.cc.
References Vector< T >::clear(), and m_Stack.
LockManager::~LockManager | ( | ) |
Destructor
Definition at line 31 of file LockManager.cc.
void LockManager::acquired | ( | Semaphore & | sem | ) |
Called by Semaphore on successful acquisition.
Definition at line 35 of file LockManager.cc.
References m_Stack, and Vector< T >::pushBack().
void LockManager::released | ( | Semaphore & | sem | ) |
Called by Semaphore on successful release.
Definition at line 40 of file LockManager.cc.
References FATAL, m_Stack, Vector< T >::popBack(), and Vector< T >::pushBack().
The stack of acquired semaphores.
Definition at line 51 of file LockManager.h.
Referenced by acquired(), LockManager(), and released().