mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-04 12:29:15 +00:00
Do the same trick as concurrentqueue.h for GetCurrentThreadId().
This commit is contained in:
@@ -13,17 +13,6 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
uint64_t GetThreadHandle()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
static_assert( sizeof( decltype( GetCurrentThreadId() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" );
|
||||
return uint64_t( GetCurrentThreadId() );
|
||||
#else
|
||||
static_assert( sizeof( decltype( pthread_self() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" );
|
||||
return uint64_t( pthread_self() );
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetThreadName( std::thread& thread, const char* name )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user