mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Alternate thread naming for older GLIBC
This commit is contained in:
@@ -870,8 +870,12 @@ void Thread::setCurrentThreadName (const String& name)
|
|||||||
{
|
{
|
||||||
[[NSThread currentThread] setName: beastStringToNS (name)];
|
[[NSThread currentThread] setName: beastStringToNS (name)];
|
||||||
}
|
}
|
||||||
#elif BEAST_LINUX && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
|
#elif BEAST_LINUX
|
||||||
pthread_setname_np (pthread_self(), name.toRawUTF8());
|
#if (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
|
||||||
|
pthread_setname_np (pthread_self(), name.toRawUTF8());
|
||||||
|
#else
|
||||||
|
prctl (PR_SET_NAME, name.toRawUTF8(), 0, 0, 0);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user