#include <pthread.h> int pthread_mutexattr_getprioceiling(const pthread_mutexatt_t *attr, int *prioceiling);
attr designates the attribute object created by an earlier call to pthread_mutexattr_init().
The attr mutex attribute object includes the priority ceiling attribute only if the symbol _POSIX_THREAD_PRIO_PROTECT is defined.
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 will be within the maximum range of priorities defined by SCHED_FIFO. To avoid priority inversion, prioceiling will be set to a priority higher than or equal to the highest priority of all the threads that might lock the particular mutex.
On successful completion, pthread_mutexattr_getprioceiling() returns 0. Any other return value indicates that an error occurred.
If any of the following conditions occurs, pthread_mutexattr_getprioceiling() fails and returns the corresponding value.
The option _POSIX_THREAD_PRIO_PROTECT is not defined and the implementation does not support the function.
If either of the following conditions occurs, pthread_mutexattr_getprioceiling() might fail and return the corresponding value.