pthread_setname_np()

assign name to thread 

Function


SYNOPSIS

#include <pthread.h>

int pthread_setname_np(pthread_t thread, const char *name);


DESCRIPTION

The pthread_setname_np() function assigns the specified name to the specified thread. This is useful for debugging purposes, so that threads can be identified symbolically. If a name is specified for a thread, it will be displayed by the NuTCRACKER Platform debugging utilities. The name can be obtained programmatically with the pthread_getname_np() function.


PARAMETERS

thread 

Is the thread to which the name is assigned.

name 

Is the name to assign to the thread.


RETURN VALUES

On success, pthread_setname_np() returns 0. On error, one of the following values is returned:

ESRCH 

thread does not specify a currently running thread in the process.

EFAULT 

name is an invalid pointer.


CONFORMANCE

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_create(), pthread_getname_np()


PTC MKS Toolkit 10.3 Documentation Build 39.