pthread_mutex_getprioceiling.3t (2010 09)
p
pthread_mutex_getprioceiling(3T) pthread_mutex_getprioceiling(3T)
(Pthread Library)
NAME
pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling() - get or set the prioceiling of a mutex.
SYNOPSIS
#include <pthread.h>
int pthread_mutex_getprioceiling(
pthread_mutex_t *__restrict mutex,
int *__restrict prioceiling
);
int pthread_mutex_setprioceiling(
pthread_mutex_t *__restrict mutex,
int prioceiling,
int *__restrict old_ceiling
);
PARAMETERS
mutex Pointer to the mutex whose prioceiling attribute is to be set/retrieved.
prioceiling
This parameter either points to the memory location where the prioceiling attribute of
mutex is to be returned (get function) or specifies the new value of the prioceiling attri-
bute for mutex (set function).
old_ceiling
This parameter points to the memory location where the old prioceiling attribute of
mutex is to be returned (set function only).
DESCRIPTION
The
pthread_mutex_setprioceiling()
function will first lock mutex . If the mutex is currently
locked, the calling thread will block until the mutex can be locked. Once the mutex has been locked, the
prioceiling attribute of mutex will be changed to the value specified in the prioceiling parameter and
mutex will be unlocked. The old priority ceiling for the mutex will be returned in old_prioceiling.
The
pthread_mutex_getprioceiling()
function returns the current value of the prioceiling attri-
bute for mutex in the prioceiling parameter.
Be sure to check for the definition of
_POSIX_THREAD_PRIO_PROTECT
before using these functions.
Not all systems will support these functions.
RETURN VALUE
Upon successful completion,
pthread_mutex_getprioceiling()
and
pthread_mutex_setprioceiling()
return zero. Otherwise, an error number is returned to indi-
cate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the
pthread_mutex_getprioceiling()
and
pthread_mutex_setprioceiling() functions return the corresponding error number:
[ENOSYS]
_POSIX_THREAD_PRIO_PROTECT is not defined and these functions are not sup-
ported.
For each of the following conditions, if the condition is detected, the
pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling()
functions
return the corresponding error number:
[EINVAL] The priority value prioceiling is not a legal value.
[EINVAL] mutex is not a valid mutex.
[ENOSYS] The prioceiling protocol is not supported for mutexes.
[EPERM] The caller does not have the appropriate privileges to change priority ceiling for
mutex.
[EFAULT] mutex parameter points to an illegal address.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1