DragonFly On-Line Manual Pages

Search: Section:  


PTHREAD_MUTEX_GETP... DragonFly Library Functions Manual PTHREAD_MUTEX_GETP...

NAME

pthread_mutex_getprioceiling, pthread_mutex_setprioceiling -- get or set the priority ceiling of a mutex

LIBRARY

POSIX Threads Library (libpthread, -lpthread)

SYNOPSIS

#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);

DESCRIPTION

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.

RETURN VALUES

If successful, these functions return 0. Otherwise, an error number is returned to indicate the error.

ERRORS

The pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling() functions will fail if: [EINVAL] The priority requested by prioceiling is out of range; or the value specified by mutex does not refer to a currently existing mutex. [EPERM] The caller does not have the privilege to perform the operation.

SEE ALSO

pthread_mutex_destroy(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_timedlock(3), pthread_mutex_trylock(3), pthread_mutex_unlock(3) DragonFly 5.5 November 30, 2017 DragonFly 5.5

Search: Section: