MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetCurrentThreadName

Function SetCurrentThreadName

src/os/unix/unix.cpp:245–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243#endif /* __APPLE__ */
244
245void SetCurrentThreadName([[maybe_unused]] const std::string &thread_name)
246{
247#if defined(__GLIBC__)
248 pthread_setname_np(pthread_self(), thread_name.c_str());
249#endif /* defined(__GLIBC__) */
250#if defined(__APPLE__)
251 MacOSSetThreadName(thread_name);
252#endif /* defined(__APPLE__) */
253}

Callers 3

StartNewThreadFunction · 0.50
SoundThreadFunction · 0.50
CheckForConsoleInputFunction · 0.50

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected