NAME

pthread_setname_np - set descriptive name of a thread

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS



int pthread_setname_np(pthread_t thread, const char *name, void *arg)

DESCRIPTION

pthread_setname_np() sets the descriptive name of the 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.

arg
The printf(3) argument used with name.

RETURN VALUES

pthread_setname_np() returns 0 on success. Otherwise, pthread_setname_np() returns an error number described in errno(2).

SEE ALSO

errno(2), pthread_getname_np(3)