netbsd man page for pthread_getname_np

Query: pthread_getname_np

OS: netbsd

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PTHREAD_GETNAME_NP(3)					   BSD Library Functions Manual 				     PTHREAD_GETNAME_NP(3)

NAME
pthread_getname_np -- get and set descriptive name of a thread
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#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);
DESCRIPTION
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. arg The printf(3) argument used with name.
RETURN VALUES
Both functions return 0 on success. Otherwise, an error number is returned to indicate the error.
COMPATIBILITY
Both functions are non-standard extensions.
ERRORS
Both functions may fail if: [EINVAL] Invalid parameter. [ESRCH] Non-existent thread. The pthread_setname_np() function may also fail if: [ENOMEM] There was insufficient memory for the operation.
SEE ALSO
pthread_attr_get_np(3), pthread_attr_getname_np(3)
BSD
July 9, 2010 BSD
Related Man Pages
pthread_attr_getname_np(3) - netbsd
pthread_getname_np(3) - netbsd
pthread_getattr_np(3) - netbsd
pthread_getname_np(3) - osf1
pthread_setname_np(3) - debian
Similar Topics in the Unix Linux Community
Open any thread, get a zero-byte blank page
Thread parameter in ANSI C makes a segmentation fault
Difference between handle to the thread HANDLE and thread identifier pthread_t
Get last field specific record
How to use printf in bash