1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Remove one level of indirection.

This commit is contained in:
Bartosz Taudul
2017-10-11 01:04:21 +02:00
parent cc8b357f09
commit af3773dc9a
5 changed files with 48 additions and 40 deletions
+3 -4
View File
@@ -31,8 +31,7 @@ struct SourceLocation
uint32_t color;
};
extern moodycamel::ConcurrentQueue<QueueItem> s_queue;
extern thread_local moodycamel::ProducerToken s_token;
extern thread_local moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* s_token;
using Magic = moodycamel::ConcurrentQueueDefaultTraits::index_t;
@@ -71,10 +70,10 @@ public:
uint32_t cpu;
Magic magic;
auto& token = s_token;
auto item = s_queue.enqueue_begin( token, magic );
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
item->hdr.type = QueueType::FrameMarkMsg;
item->frameMark.time = GetTime( cpu );
s_queue.enqueue_finish( token, magic );
token->enqueue_finish( magic );
}
static bool ShouldExit();