HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)

p
pthread_mutexattr_getprotocol(3T) pthread_mutexattr_getprotocol(3T)
(Pthread Library)
POSIX.1c does not define a default value for the protocol attribute. On HP-UX, the default value is
PTHREAD_PRIO_NONE
.
pthread_mutexattr_setprotocol()
is used to set the protocol attribute in the initialized attri-
butes object attr. The new value of the protocol attribute of attr is set to the value specified in the protocol
parameter.
pthread_mutexattr_getprotocol()
retrieves the value of the protocol attribute from the mutex
attributes object attr. The value of the protocol attribute of attr is returned in the protocol parameter.
ATTRIBUTE: prioceiling
If the protocol attribute has a value of
PTHREAD_PRIO_PROTECT
, the prioceiling attribute indicates the
priority ceiling of the mutex. Otherwise, this attribute is not used when the mutex is initialized.
The priority values that are valid for this attribute are the same values that are valid for the
SCHED_FIFO scheduling policy.
POSIX.1c does not define a default value for the prioceiling attribute. On HP-UX, the default value is the
minimum priority value for the
SCHED_FIFO scheduling policy.
pthread_mutexattr_setprioceiling()
is used to set the prioceiling attribute in the initialized
attributes object attr. The new value of the prioceiling attribute of attr is set to the value specified in the
prioceiling parameter.
pthread_mutexattr_getprioceiling()
retrieves the value of the prioceiling attribute from the
mutex attributes object attr. The value of the prioceiling attribute of attr is returned in the prioceiling
parameter.
RETURN VALUE
Upon successful completion,
pthread_mutexattr_setprioceiling()
,
pthread_mutexattr_getprioceiling()
, pthread_mutexattr_setprotocol()
, and
pthread_mutexattr_getprotocol()
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_mutexattr_setprioceiling()
,
pthread_mutexattr_getprioceiling()
, pthread_mutexattr_setprotocol()
, and
pthread_mutexattr_getprotocol()
functions return the corresponding error number:
[ENOSYS]
_POSIX_THREAD_PRIO_PROTECT
is not defined and these functions are not sup-
ported.
[ENOTSUP] protocol contains an unsupported value.
For each of the following conditions, if the condition is detected, the
pthread_mutexattr_setprioceiling()
, pthread_mutexattr_getprioceiling()
,
pthread_mutexattr_setprotocol()
, and pthread_mutexattr_getprotocol()
functions
return the corresponding error number:
[EINVAL] The value specified by attr, prioceiling,orprotocol is invalid.
[EPERM] The caller does not have the appropriate privilege to set the priority ceiling or priority
protocol to the specified values.
AUTHOR
pthread_mutexattr_setprioceiling()
, pthread_mutexattr_getprioceiling(),
pthread_mutexattr_setprotocol(), and pthread_mutexattr_getprotocol()
were
derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_create(3T), pthread_mutexattr_init(3T), pthread_mutex_init(3T).
STANDARDS CONFORMANCE
pthread_mutexattr_setprioceiling()
: POSIX 1003.1c.
pthread_mutexattr_getprioceiling(): POSIX 1003.1c.
pthread_mutexattr_setprotocol(): POSIX 1003.1c.
pthread_mutexattr_getprotocol(): POSIX 1003.1c.
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 3729