#include <oskit/threads/pthread.h>int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol);
Set the protocol in a previously initialized mutex attribute object. When a mutex is created with the protocol PTHREAD_PRIO_INHERIT, threads that blocked on the mutex will result in a transfer of priority from higher to lower priority threads.
- attr
- A pointer to the pthread_mutexattr_t object representing the attributes for a mutex initialization.
- protocol
- Either PTHREAD_PRIO_NONE or PTHREAD_PRIO_INHERIT.
Returns zero on success.
pthread_mutex_init