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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

96       None.
97

APPLICATION USAGE

99       None.
100

RATIONALE

102       None.
103

FUTURE DIRECTIONS

105       None.
106

SEE ALSO

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