On successful completion, pthread_mutexattr_setprotocol() returns 0. Any other returned value indicates that an error occurred.
If either of the following conditions occurs, pthread_mutexattr_setprotocol() fails and returns the corresponding value.
Neither of the options _POSIX_THREAD_PRIO_INHERIT and _POSIX_THREAD_PRIO_PROTECT is defined and the implementation does not support the function.
The value specified by protocol is an unsupported value.
If either of the following conditions occurs, pthread_mutexattr_setprotocol() might fail and return the corresponding value.