Add macro for handling serial dequeue thread context checks.

This commit is contained in:
Bartosz Taudul 2021-10-09 15:30:58 +02:00
parent 2d5d4293a9
commit 2eeade89ba
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2226,6 +2226,16 @@ Profiler::DequeueStatus Profiler::DequeueContextSwitches( tracy::moodycamel::Con
return ( timeStop == -1 || sz > 0 ) ? DequeueStatus::DataDequeued : DequeueStatus::QueueEmpty;
}
#define ThreadCtxCheckSerial( _name ) \
uint32_t thread = MemRead<uint32_t>( &item->_name.thread ); \
switch( ThreadCtxCheck( thread ) ) \
{ \
case ThreadCtxStatus::Same: break; \
case ThreadCtxStatus::Changed: assert( m_refTimeThread == 0 ); refThread = 0; break; \
case ThreadCtxStatus::ConnectionLost: return DequeueStatus::ConnectionLost; \
default: assert( false ); break; \
}
Profiler::DequeueStatus Profiler::DequeueSerial()
{
{