5#if defined(HAVE_CONFIG_H)
6#include <config/bitcoin-config.h>
11#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
13#include <pthread_np.h>
18#ifdef HAVE_SYS_PRCTL_H
25#if defined(PR_SET_NAME)
28#elif (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
void ThreadSetInternalName(std::string &&)
Set the internal (in-memory) name of the current thread only.
const std::string & ThreadGetInternalName()
Get the thread's internal (in-memory) name; used e.g.
void ThreadRename(std::string &&)
Rename a thread both in terms of an internal (in-memory) name as well as its system thread name.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static thread_local std::string g_thread_name
static void SetInternalName(std::string name)
Set the in-memory internal name for this thread.
static void SetThreadName(const char *name)
Set the thread's name at the process level.