1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-03 14:03:52 +00:00

Proper handling of recursive mutices.

This commit is contained in:
Bartosz Taudul 2017-10-25 23:30:51 +02:00
parent 52430d08b7
commit e16f784617

View File

@ -2182,7 +2182,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
{ {
if( (*vbegin)->lockingThread == thread ) if( (*vbegin)->lockingThread == thread )
{ {
if( (*vbegin)->waitList == 0 ) if( ( (*vbegin)->waitList & ~( uint64_t( 1 ) << thread ) ) == 0 )
{ {
state = State::HasLock; state = State::HasLock;
} }
@ -2212,7 +2212,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
{ {
if( (*next)->lockingThread == thread ) if( (*next)->lockingThread == thread )
{ {
if( (*next)->waitList == 0 ) if( ( (*next)->waitList & ~( uint64_t( 1 ) << thread ) ) == 0 )
{ {
nextState = State::HasLock; nextState = State::HasLock;
break; break;
@ -2243,7 +2243,10 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
} }
if( (*next)->waitList != 0 ) if( (*next)->waitList != 0 )
{ {
nextState = State::HasBlockingLock; if( ( (*next)->waitList & ~( uint64_t( 1 ) << thread ) ) != 0 )
{
nextState = State::HasBlockingLock;
}
break; break;
} }
next++; next++;
@ -2271,7 +2274,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
{ {
if( (*next)->lockingThread == thread ) if( (*next)->lockingThread == thread )
{ {
if( (*next)->waitList == 0 ) if( ( (*next)->waitList & ~( uint64_t( 1 ) << thread ) ) == 0 )
{ {
nextState = State::HasLock; nextState = State::HasLock;
break; break;