#include <pthread.h>
int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict
mutex,
int *restrict prioceiling);
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict mutex,
int prioceiling, int *restrict old_ceiling);
The pthread_mutex_getprioceiling() function shall return the current priority ceiling of the mutex.
The pthread_mutex_setprioceiling() function shall either lock the mutex if it is unlocked, or block until it can successfully lock the mutex, then it shall change the mutex's priority ceiling and release the mutex. When the change is successful, the previous value of the priority ceiling shall be returned in old_ceiling. The process of locking the mutex need not adhere to the priority protect protocol.
If the pthread_mutex_setprioceiling() function fails, the mutex priority ceiling shall not be changed.
If successful, the pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling() functions shall return zero; otherwise, an error number shall be returned to indicate the error.
The pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling() functions may fail if:
These functions shall not return an error code of [EINTR].
The following sections are informative.
pthread_mutex_destroy() , pthread_mutex_lock() , pthread_mutex_timedlock() , the Base Definitions volume of IEEE Std 1003.1-2001, <pthread.h>