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

No thread names on emscripten.

This commit is contained in:
Bartosz Taudul 2017-11-29 11:11:16 +01:00
parent 824d9e9bca
commit ab1f93194e

View File

@ -68,7 +68,7 @@ void SetThreadName( std::thread::native_handle_type handle, const char* name )
{ {
} }
# endif # endif
#elif defined _GNU_SOURCE #elif defined _GNU_SOURCE && !defined __EMSCRIPTEN__
const auto sz = strlen( name ); const auto sz = strlen( name );
if( sz <= 15 ) if( sz <= 15 )
{ {
@ -133,7 +133,7 @@ const char* GetThreadName( uint64_t id )
} }
} }
# endif # endif
# elif defined _GNU_SOURCE && !defined __ANDROID__ # elif defined _GNU_SOURCE && !defined __ANDROID__ && !defined __EMSCRIPTEN__
if( pthread_getname_np( (pthread_t)id, buf, 256 ) == 0 ) if( pthread_getname_np( (pthread_t)id, buf, 256 ) == 0 )
{ {
return buf; return buf;