MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RenameThread

Function RenameThread

src/util.cpp:1158–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156}
1157
1158void RenameThread(const char* name)
1159{
1160#if defined(PR_SET_NAME)
1161 // Only the first 15 characters are used (16 - NUL terminator)
1162 ::prctl(PR_SET_NAME, name, 0, 0, 0);
1163#elif (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
1164 pthread_set_name_np(pthread_self(), name);
1165
1166#elif defined(MAC_OSX)
1167 pthread_setname_np(name);
1168#else
1169 // Prevent warnings for unused parameters...
1170 (void)name;
1171#endif
1172}
1173
1174void SetupEnvironment()
1175{

Callers 6

ThreadHTTPFunction · 0.85
HTTPWorkQueueRunFunction · 0.85
ShutdownFunction · 0.85
ThreadImportFunction · 0.85
ThreadScriptCheckFunction · 0.85
TraceThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected