Files
simple64/util/thread_name.cpp
T
Logan McNaughton 0ff4aed2cb Squashed 'parallel-rdp-standalone/' content from commit 773181a
git-subtree-dir: parallel-rdp-standalone
git-subtree-split: 773181ae2b1329a3bb8498364e61ec8aa7694fdd
2021-06-04 22:37:51 -06:00

18 lines
252 B
C++

#include "thread_name.hpp"
#ifdef __linux__
#include <pthread.h>
#endif
namespace Util
{
void set_current_thread_name(const char *name)
{
#ifdef __linux__
pthread_setname_np(pthread_self(), name);
#else
// TODO: Kinda messy.
(void)name;
#endif
}
}