pthread_mutex_setname_np()

assign name to mutex 

Function


SYNOPSIS

#include <pthread.h>

int pthread_mutex_setname_np(pthread_mutex_t *mutex, const char *name);


DESCRIPTION

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


PARAMETERS

mutex 

Is the mutex to which the name is assigned.

name 

Is the name to assign to the mutex.


RETURN VALUES

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

EINVAL 

mutex does not refer to an initialized mutex.

EFAULT 

mutex or 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_mutex_getname_np(), pthread_mutex_init()


PTC MKS Toolkit 10.3 Documentation Build 39.