1
0
Files
irix-657m-src/eoe/man/man3p/pthread_mutex_setprioceiling.3p
2022-09-29 17:59:04 +03:00

64 lines
1.4 KiB
Plaintext

'\"macro stdmacro
.TH pthread_mutex_setprioceiling 3P
.SH NAME
pthread_mutex_setprioceiling, pthread_mutex_getprioceiling \-
set/get a mutex's priority ceiling
.Op c p a
.SH C SYNOPSIS
.nf
.ft 3
#include <pthread.h>
.HP
.ft 3
int pthread_mutex_setprioceiling(pthread_mutex_t \(**mutex,
.br
int prioceiling, int \(**old_ceiling);
.HP
.ft 3
int pthread_mutex_getprioceiling(const pthread_mutex_t \(**mutex,
.br
int \(**prioceiling);
.ft 1
.SH DESCRIPTION
The
.IR pthread_mutex_getprioceiling ()
function returns the current priority ceiling of the named mutex.
.LP
The
.IR pthread_mutex_setprioceiling ()
function acquires the named mutex, then changes the mutex's priority
ceiling and releases the mutex.
The value of
.I prioceiling
must be between the values returned by
.IR sched_get_priority_min ()
and
.IR sched_get_priority_max (),
inclusive.
.LP
If successful, the previous value of the mutex priority ceiling is
returned in
.IR old_ceiling .
.SH "DIAGNOSTICS"
If successful, the mutex protocol functions return zero;
otherwise, an error number is returned:
.TP 15
.B [EINVAL]
The priority specified by
.I prioceiling
is out of range.
.TP 15
.B [EPERM]
The mutex was not initialized with the
.B PTHREAD_PRIO_PROTECT
protocol attribute.
.SH "SEE ALSO"
pthread_mutexattr_setprotocol(3P),
pthread_mutex_lock(3P),
sched_get_priority_min(3C),
sched_get_priority_max(3C).
.SH NOTES
Calls to
.IR pthread_mutex_setprioceiling ()
are not subject to the priority protect protocol.