mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Provide macros for async-or-sync queue insertion.
If fibers are enabled, then some events which were traditionally stored in async queues will have to be serialized. These macros provide the needed infrastructure for this.
This commit is contained in:
parent
250ef2cf6e
commit
6411b35d68
@ -105,6 +105,19 @@ struct LuaZoneState
|
||||
__tail.store( __magic + 1, std::memory_order_release );
|
||||
|
||||
|
||||
#ifdef TRACY_FIBERS
|
||||
# define TracyQueuePrepare( _type ) \
|
||||
auto item = Profiler::QueueSerial(); \
|
||||
MemWrite( &item->hdr.type, _type );
|
||||
# define TracyQueueCommit( _name ) \
|
||||
MemWrite( &item->_name.thread, GetThreadHandle() ); \
|
||||
Profiler::QueueSerialFinish();
|
||||
#else
|
||||
# define TracyQueuePrepare( _type ) TracyLfqPrepare( _type )
|
||||
# define TracyQueueCommit( _name ) TracyLfqCommit
|
||||
#endif
|
||||
|
||||
|
||||
typedef void(*ParameterCallback)( uint32_t idx, int32_t val );
|
||||
|
||||
class Profiler
|
||||
|
Loading…
Reference in New Issue
Block a user