next up previous contents index
Next: 18.3.12 pthread_mutexattr_settype: Set the Up: 18.3 POSIX Threads Reference Previous: 18.3.10 pthread_mutexattr_init: Initialize a

18.3.11 pthread_mutexattr_setprotocol: Set the protocol attribute of a mutex attributes object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol);

DESCRIPTION

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.

PARAMETERS

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

Returns zero on success.

RELATED INFORMATION

pthread_mutex_init



University of Utah Flux Research Group