1
0

Did some static analysis, fixed some bugs and optimized a lot of code

This commit is contained in:
jfhumann
2014-04-18 21:09:44 +02:00
parent 449afa850e
commit 013da806ec
48 changed files with 257 additions and 212 deletions

View File

@@ -112,18 +112,21 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
ASSERT(!"Unknown world in cDeadlockDetect");
return;
}
if (itr->second.m_Age == a_Age)
cDeadlockDetect::sWorldAge & WorldAge = itr->second;
if (WorldAge.m_Age == a_Age)
{
itr->second.m_NumCyclesSame += 1;
if (itr->second.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS)
WorldAge.m_NumCyclesSame += 1;
if (WorldAge.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS)
{
DeadlockDetected();
}
}
else
{
itr->second.m_Age = a_Age;
itr->second.m_NumCyclesSame = 0;
WorldAge.m_Age = a_Age;
WorldAge.m_NumCyclesSame = 0;
}
}