1
0
Fork 0

Merged in Nukem9/x64_dbg (pull request #39)

Bugfix
This commit is contained in:
mrexodia 2014-12-21 13:12:32 +01:00
commit 1aa12aa529
2 changed files with 7 additions and 1 deletions

View File

@ -53,20 +53,25 @@ CriticalSectionLocker::CriticalSectionLocker(CriticalSectionLock lock)
{
CriticalSectionInitializeLocks(); //initialize critical sections
gLock = lock;
EnterCriticalSection(&locks[gLock]);
Locked = true;
}
CriticalSectionLocker::~CriticalSectionLocker()
{
LeaveCriticalSection(&locks[gLock]);
if(Locked)
LeaveCriticalSection(&locks[gLock]);
}
void CriticalSectionLocker::unlock()
{
Locked = false;
LeaveCriticalSection(&locks[gLock]);
}
void CriticalSectionLocker::relock()
{
EnterCriticalSection(&locks[gLock]);
Locked = true;
}

View File

@ -46,6 +46,7 @@ public:
private:
CriticalSectionLock gLock;
bool Locked;
};
#endif // _THREADING_H