Multithreaded Programming Guide

pthread_mutexattr_getrobust_np(3THR)

pthread_mutexattr_getrobust_np(3THR) gets the robust attribute of a mutex attribute object.

#include <pthread.h>

int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr, 
												int *robustness);

Note –

pthread_mutexattr_getrobust_np() applies only if the symbol _POSIX_THREAD_PRIO_INHERIT is defined.


attr points to the mutex attribute object previously created by a call to pthread_mutexattr_init().

robustness is the value of the robust attribute of a mutex attribute object.

Return Values

On successful completion, pthread_mutexattr_getrobust_np() returns 0. Any other return value indicates that an error occurred.

If any of the following conditions occurs, pthread_mutexattr_getrobust_np() fails and returns the corresponding value.


ENOSYS

The option _POSIX_THREAD_PRIO__INHERIT is not defined or the implementation does not support pthread_mutexattr_getrobust_np().

pthread_mutexattr_getrobust_np() might fail if:


EINVAL

The value specified by attr or robustness is invalid.