TD_THR_GETNAME(3)

NAME
td_thr_getname - get the user-assigned name of a thread

LIBRARY
libpthread_dbg

SYNOPSIS
#include <pthread_dbg.h>
int
td_thr_getname(td_thread_t *thread, char *name, int len);

DESCRIPTION
The td_thr_getname function retrieves the user-assigned name of a thread thread and stores it in the buffer name of length len. If the name is longer than the buffer size, the result will be truncated. The returned string always terminates with a NUL byte. The maximum length of a thread's name, including terminating character, is defined by PTHREAD_MAX_NAMELEN_NP.

RETURN VALUES
If successful, the td_thr_getname function will return TD_ERR_OK. Otherwise an error number will be returned to indicate failure as described in pthread_dbg(3).

SEE ALSO
pthread(3), pthread_dbg(3)

HISTORY
The td_thr_getname function first appeared in NetBSD 2.0.

AUTHORS
-nosplit Nathan J. Williams <nathanw@NetBSD.org>

This manual page was written by Kamil Rytarowski <kamil@NetBSD.org>.