MCPcopy Create free account
hub / github.com/LUX-Core/lux / RenameThread

Function RenameThread

src/util.cpp:855–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855void RenameThread(const char* name)
856{
857#if defined(PR_SET_NAME)
858 // Only the first 15 characters are used (16 - NUL terminator)
859 ::prctl(PR_SET_NAME, name, 0, 0, 0);
860#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__))
861 // TODO: This is currently disabled because it needs to be verified to work
862 // on FreeBSD or OpenBSD first. When verified the '0 &&' part can be
863 // removed.
864 pthread_set_name_np(pthread_self(), name);
865
866#elif defined(MAC_OSX) && defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
867
868// pthread_setname_np is XCode 10.6-and-later
869#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
870 pthread_setname_np(name);
871#endif
872
873#else
874 // Prevent warnings for unused parameters...
875 (void)name;
876#endif
877}
878
879void SetupEnvironment()
880{

Callers 8

ThreadHTTPFunction · 0.85
HTTPWorkQueueRunFunction · 0.85
PrepareShutdownFunction · 0.85
ThreadImportFunction · 0.85
ThreadFlushWalletDBFunction · 0.85
ThreadCheckDarkSendPoolFunction · 0.85
TraceThreadFunction · 0.85
ThreadScriptCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected