pthread_mutexattr_getprotocol(3C) gets the protocol attribute of a mutex attribute object.
#include <pthread.h> int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict attr, int *restrict protocol);
attr points to a mutex attribute object created by an earlier call to pthread_mutexattr_init().
protocol contains one of the following protocol attributes: PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT which are defined by the header <pthread.h>.
If either of the following conditions occurs, pthread_mutexattr_getprotocol() might fail and return the corresponding value.
The value specified by attr is NULL, or the value specified by attr or protocol is invalid.
The caller does not have the privilege to perform the operation.