barrier/mt/CLock.cpp
crs 6aba3a6f57 removed exception specifications. thread exceptions weren't
being listed and they'd have to be added to every one.  just
doesn't seem worth the trouble.
2001-10-14 16:58:01 +00:00

23 lines
278 B
C++

#include "CLock.h"
#include "CMutex.h"
#include "CCondVar.h"
//
// CLock
//
CLock::CLock(const CMutex* mutex) : m_mutex(mutex)
{
m_mutex->lock();
}
CLock::CLock(const CCondVarBase* cv) : m_mutex(cv->getMutex())
{
m_mutex->lock();
}
CLock::~CLock()
{
m_mutex->unlock();
}