pthread_{get,set}name_np is not standard.

This commit is contained in:
Bartosz Taudul 2017-10-28 12:16:52 +02:00
parent 3163563a27
commit d21040e3d8

View File

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