add LockMutex::Unlock
This commit is contained in:
@@ -79,11 +79,13 @@ LockMutex::LockMutex(RageMutex &mut, const char *file_, int line_):
|
||||
locked_at(RageTimer::GetTimeSinceStart())
|
||||
{
|
||||
mutex.Lock();
|
||||
locked = true;
|
||||
}
|
||||
|
||||
LockMutex::~LockMutex()
|
||||
{
|
||||
mutex.Unlock();
|
||||
if(locked)
|
||||
mutex.Unlock();
|
||||
|
||||
if(file)
|
||||
{
|
||||
@@ -93,6 +95,15 @@ LockMutex::~LockMutex()
|
||||
}
|
||||
}
|
||||
|
||||
void LockMutex::Unlock()
|
||||
{
|
||||
ASSERT(locked);
|
||||
locked = false;
|
||||
|
||||
mutex.Unlock();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: RageThreads
|
||||
|
||||
Reference in New Issue
Block a user