| PTHREAD_GETNAME_NP(3) | Library Functions Manual | PTHREAD_GETNAME_NP(3) |
pthread_getname_np,
pthread_setname_np — get and
set descriptive name of a thread
POSIX Threads Library (libpthread, -lpthread)
#include
<pthread.h>
int
pthread_getname_np(pthread_t
thread, char *name,
size_t len);
int
pthread_setname_np(pthread_t
thread, const char
*name, void
*arg);
The
pthread_getname_np()
function obtains the descriptive name of a thread. It takes the following
arguments:
The
pthread_setname_np()
function sets the descriptive name of a thread. It takes the following
arguments:
Both functions return 0 on success. Otherwise, an error number is returned to indicate the error.
Both functions are non-standard extensions.
Both functions may fail if:
The pthread_setname_np() function may also
fail if:
ENOMEM]| July 9, 2010 | NetBSD 11.0 |