NAME
pthread_mutexattr_setprioceiling
pthread_mutexattr_getprioceiling —
set and get prioceiling attribute of mutex attribute object
(REALTIME THREADS)
SYNOPSIS
#include <pthread.h>
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
int prioceiling);
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr,
int *prioceiling);
DESCRIPTION
The pthread_mutexattr_setprioceiling() and pthread_mutexattr_getprioceiling() functions, respectively, set and get the priority ceiling attribute of a mutex attribute object pointed to by attr which was previously created by the function pthread_mutexattr_init(3) .
The prioceiling attribute contains the priority ceiling of initialised mutexes. The values of prioceiling will be within the maximum range of priorities defined by SCHED_FIFO.
The prioceiling attribute defines the priority ceiling of initialised mutexes, which is the minimum priority level at which the critical section guarded by the mutex is executed. In order to avoid priority inversion, the priority ceiling of the mutex will be set to a priority higher than or equal to the highest priority of all the threads that may lock that mutex. The values of prioceiling will be within the maximum range of priorities defined under the SCHED_FIFO scheduling policy.
RETURN VALUE
Upon successful completion, the pthread_mutexattr_setprioceiling() and pthread_mutexattr_getprioceiling() functions return zero. Otherwise, an error number is returned to indicate the error.
ERRORS
The pthread_mutexattr_setprioceiling() and pthread_mutexattr_getprioceiling() functions will fail if:
- [ENOSYS]
- The option _POSIX_THREAD_PRIO_PROTECT is not defined and the implementation does not support the function.
The pthread_mutexattr_setprioceiling() and pthread_mutexattr_getprioceiling() functions may fail if:
EXAMPLES
None.
APPLICATION USAGE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
pthread_create(3) , pthread_mutex_init(3) , pthread_cond_init(3) , <pthread.h> .
DERIVATION
Derived from the POSIX Threads Extension (1003.1c-1995)