1PTHREAD_MUTEXATTR_GETPRIOCEIPLOISNIGX(3PPr)ogrammerP'TsHRMEaAnDu_aMlUTEXATTR_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_mutexattr_getprioceiling,  pthread_mutexattr_setprioceiling   —
13       get  and  set  the prioceiling attribute of the mutex attributes object
14       (REALTIME THREADS)
15

SYNOPSIS

17       #include <pthread.h>
18
19       int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t
20           *restrict attr, int *restrict prioceiling);
21       int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
22           int prioceiling);
23

DESCRIPTION

25       The pthread_mutexattr_getprioceiling()  and  pthread_mutexattr_setprio‐
26       ceiling() functions, respectively, shall get and set the priority ceil‐
27       ing attribute of a mutex attributes object pointed to by attr which was
28       previously created by the function pthread_mutexattr_init().
29
30       The  prioceiling attribute contains the priority ceiling of initialized
31       mutexes. The values of prioceiling are within the maximum range of pri‐
32       orities defined by SCHED_FIFO.
33
34       The  prioceiling  attribute defines the priority ceiling of initialized
35       mutexes, which is the minimum priority level at which the critical sec‐
36       tion  guarded  by  the  mutex  is  executed. In order to avoid priority
37       inversion, the priority ceiling of the mutex shall be set to a priority
38       higher  than  or  equal to the highest priority of all the threads that
39       may lock that mutex. The values of prioceiling are within  the  maximum
40       range of priorities defined under the SCHED_FIFO scheduling policy.
41
42       The  behavior  is undefined if the value specified by the attr argument
43       to pthread_mutexattr_getprioceiling() or pthread_mutexattr_setprioceil‐
44       ing() does not refer to an initialized mutex attributes object.
45

RETURN VALUE

47       Upon  successful completion, the pthread_mutexattr_getprioceiling() and
48       pthread_mutexattr_setprioceiling() functions shall return zero;  other‐
49       wise, an error number shall be returned to indicate the error.
50

ERRORS

52       These functions may fail if:
53
54       EINVAL The value specified by prioceiling is invalid.
55
56       EPERM  The caller does not have the privilege to perform the operation.
57
58       These functions shall not return an error code of [EINTR].
59
60       The following sections are informative.
61

EXAMPLES

63       None.
64

APPLICATION USAGE

66       None.
67

RATIONALE

69       If an implementation detects that the value specified by the attr argu‐
70       ment to pthread_mutexattr_getprioceiling() or pthread_mutexattr_setpri‐
71       oceiling() does not refer to an initialized mutex attributes object, it
72       is recommended that the function should fail  and  report  an  [EINVAL]
73       error.
74

FUTURE DIRECTIONS

76       None.
77

SEE ALSO

79       pthread_cond_destroy(), pthread_create(), pthread_mutex_destroy()
80
81       The Base Definitions volume of POSIX.1‐2017, <pthread.h>
82
84       Portions  of  this text are reprinted and reproduced in electronic form
85       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
86       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
87       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
88       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
89       event of any discrepancy between this version and the original IEEE and
90       The  Open Group Standard, the original IEEE and The Open Group Standard
91       is the referee document. The original Standard can be  obtained  online
92       at http://www.opengroup.org/unix/online.html .
93
94       Any  typographical  or  formatting  errors that appear in this page are
95       most likely to have been introduced during the conversion of the source
96       files  to  man page format. To report such errors, see https://www.ker
97       nel.org/doc/man-pages/reporting_bugs.html .
98
99
100
101IEEE/The Open Group                  2017 PTHREAD_MUTEXATTR_GETPRIOCEILING(3P)
Impressum