man.bsd.lv manual page server

Manual Page Search Parameters

PTHREAD_MUTEX_GETPRIOCEILING(3) Library Functions Manual PTHREAD_MUTEX_GETPRIOCEILING(3)

pthread_mutex_getprioceiling, pthread_mutex_setprioceilingget or set the priority ceiling of a mutex

library “libpthread”

#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 () function shall return the current priority ceiling of the mutex.

The () 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, these functions return 0. Otherwise, an error number is returned to indicate the error.

The pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling() functions will fail if:

[]
The priority requested by prioceiling is out of range; or the value specified by mutex does not refer to a currently existing mutex.
[]
The caller does not have the privilege to perform the operation.

pthread_mutex_destroy(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_timedlock(3), pthread_mutex_trylock(3), pthread_mutex_unlock(3)

November 30, 2017 DragonFly-5.6.1