PTHREAD_SETNAME_NP(3) Linux Programmer's Manual PTHREAD_SETNAME_NP(3)
pthread_setname_np, pthread_getname_np - set/get the name of a thread
#define _GNU_SOURCE /* See feature_test_macros(7) */
int pthread_setname_np(pthread_t thread, const char *name);
int pthread_getname_np(pthread_t thread,
const char *name, size_t len);
Compile and link with -pthread.
By default, all the threads created using pthread_create() inherit the program name. The pthread_setname_np() function can be used to set
a unique name for a thread, which can be useful for debugging multithreaded applications. The thread name is a meaningful C language
string, whose length is restricted to 16 characters, including the terminating null byte ('