The
pthread_getname_np() function obtains the descriptive name of a thread. It takes the following arguments:
thread
The thread whose descriptive name will be obtained.
name
The buffer to be filled with the descriptive name of the thread.
len
The size of the buffer name in bytes.
The
pthread_setname_np() function sets the descriptive name of a thread. It takes the following arguments:
thread
The thread whose descriptive name will be set.
name
The
printf(3) format string to be used to construct the descriptive name of the thread. The resulted descriptive name should be shorter than
PTHREAD_MAX_NAMELEN_NP.