pthread_mutexattr_getprioceiling(3C) gets the priority ceiling attribute of a mutex attribute object.
#include <pthread.h> int pthread_mutexattr_getprioceiling(const pthread_mutexatt_t *restrict attr, int *restrict prioceiling);
attr designates the attribute object created by an earlier call to pthread_mutexattr_init().
pthread_mutexattr_getprioceiling() returns the priority ceiling of initialized mutexes in prioceiling. The ceiling defines the minimum priority level at which the critical section guarded by the mutex is executed. prioceiling falls within the maximum range of priorities defined by SCHED_FIFO. To avoid priority inversion, set prioceiling to a priority higher than or equal to the highest priority of all threads that might lock the particular mutex.
If either of the following conditions occurs, pthread_mutexattr_getprioceiling() might fail and return the corresponding value.
The value specified by attr is NULL.
The caller does not have the privilege to perform the operation.