1PTHREAD_MUTEX_GETPRIOCEILINGP(O3SPI)X Programmer's MPaTnHuRaElAD_MUTEX_GETPRIOCEILING(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       pthread_mutex_getprioceiling, pthread_mutex_setprioceiling  —  get  and
14       set the priority ceiling of a mutex (REALTIME THREADS)
15

SYNOPSIS

17       #include <pthread.h>
18
19       int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict mutex,
20           int *restrict prioceiling);
21       int pthread_mutex_setprioceiling(pthread_mutex_t *restrict mutex,
22           int prioceiling, int *restrict old_ceiling);
23

DESCRIPTION

25       The  pthread_mutex_getprioceiling()  function  shall return the current
26       priority ceiling of the mutex.
27
28       The pthread_mutex_setprioceiling() function shall attempt to  lock  the
29       mutex  as if by a call to pthread_mutex_lock(), except that the process
30       of locking the mutex need not adhere to the priority protect  protocol.
31       On acquiring the mutex it shall change the mutex's priority ceiling and
32       then release the mutex as if by a call to pthread_mutex_unlock().  When
33       the  change  is  successful, the previous value of the priority ceiling
34       shall be returned in old_ceiling.
35
36       If the pthread_mutex_setprioceiling() function fails, the mutex  prior‐
37       ity ceiling shall not be changed.
38

RETURN VALUE

40       If      successful,      the     pthread_mutex_getprioceiling()     and
41       pthread_mutex_setprioceiling() functions shall return zero;  otherwise,
42       an error number shall be returned to indicate the error.
43

ERRORS

45       These functions shall fail if:
46
47       EINVAL The protocol attribute of mutex is PTHREAD_PRIO_NONE.
48
49       EPERM  The  implementation  requires  appropriate privileges to perform
50              the operation and the caller does not  have  appropriate  privi‐
51              leges.
52
53       The pthread_mutex_setprioceiling() function shall fail if:
54
55       EAGAIN The  mutex  could  not be acquired because the maximum number of
56              recursive locks for mutex has been exceeded.
57
58       EDEADLK
59              The mutex  type  is  PTHREAD_MUTEX_ERRORCHECK  and  the  current
60              thread already owns the mutex.
61
62       EINVAL The  mutex  was  created  with the protocol attribute having the
63              value PTHREAD_PRIO_PROTECT and the calling thread's priority  is
64              higher than the mutex's current priority ceiling, and the imple‐
65              mentation adheres  to  the  priority  protect  protocol  in  the
66              process of locking the mutex.
67
68       ENOTRECOVERABLE
69              The mutex is a robust mutex and the state protected by the mutex
70              is not recoverable.
71
72       EOWNERDEAD
73              The mutex is a robust mutex and the process containing the  pre‐
74              vious owning thread terminated while holding the mutex lock. The
75              mutex lock shall be acquired by the calling thread and it is  up
76              to   the   new   owner   to   make  the  state  consistent  (see
77              pthread_mutex_lock()).
78
79       The pthread_mutex_setprioceiling() function may fail if:
80
81       EDEADLK
82              A deadlock condition was detected.
83
84       EINVAL The priority requested by prioceiling is out of range.
85
86       EOWNERDEAD
87              The mutex is a robust mutex and the previous owning thread  ter‐
88              minated  while  holding  the mutex lock. The mutex lock shall be
89              acquired by the calling thread and it is up to the new owner  to
90              make the state consistent (see pthread_mutex_lock()).
91
92       These functions shall not return an error code of [EINTR].
93
94       The following sections are informative.
95

EXAMPLES

97       None.
98

APPLICATION USAGE

100       None.
101

RATIONALE

103       None.
104

FUTURE DIRECTIONS

106       None.
107

SEE ALSO

109       pthread_mutex_destroy(),   pthread_mutex_lock(),   pthread_mutex_timed‐
110       lock()
111
112       The Base Definitions volume of POSIX.1‐2008, <pthread.h>
113
115       Portions of this text are reprinted and reproduced in  electronic  form
116       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
117       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
118       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
119       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
120       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
121       event of any discrepancy between this version and the original IEEE and
122       The  Open Group Standard, the original IEEE and The Open Group Standard
123       is the referee document. The original Standard can be  obtained  online
124       at http://www.unix.org/online.html .
125
126       Any  typographical  or  formatting  errors that appear in this page are
127       most likely to have been introduced during the conversion of the source
128       files  to  man page format. To report such errors, see https://www.ker
129       nel.org/doc/man-pages/reporting_bugs.html .
130
131
132
133IEEE/The Open Group                  2013     PTHREAD_MUTEX_GETPRIOCEILING(3P)
Impressum