isle/LEGO1/mxautolocker.cpp
2023-06-14 01:22:42 +01:00

14 lines
322 B
C++

#include "mxautolocker.h"
MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
{
this->m_criticalSection = critsect;
if (this->m_criticalSection != 0)
this->m_criticalSection->Enter();
}
MxAutoLocker::~MxAutoLocker()
{
if (this->m_criticalSection != 0)
this->m_criticalSection->Leave();
}