RTEMS Logo

RTEMS 4.6.1 On-Line Library


Mutex Manager pthread_mutexattr_setprotocol - Set the Blocking Protocol

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

10.4.3: pthread_mutexattr_setprotocol - Set the Blocking Protocol

CALLING SEQUENCE:

#include <pthread.h>

int pthread_mutexattr_setprotocol(
  pthread_mutexattr_t *attr,
  int                  protocol
);

STATUS CODES:

EINVAL
The attribute pointer argument is invalid.
EINVAL
The attribute set is not initialized.
EINVAL
The protocol argument is invalid.

DESCRIPTION:

The pthread_mutexattr_setprotocol routine is used to set value of the protocol attribute. This attribute controls the order in which threads waiting on this mutex will receive it.

The protocol can be one of the following:

PTHREAD_PRIO_NONE
in which case blocking order is FIFO.
PTHREAD_PRIO_INHERIT
in which case blocking order is priority with the priority inheritance protocol in effect.
PTHREAD_PRIO_PROTECT
in which case blocking order is priority with the priority ceiling protocol in effect.

NOTES:

There is currently no way to get simple priority blocking ordering with POSIX mutexes even though this could easily by supported by RTEMS.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation