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
11

NAME

13       pthread_mutexattr_getprioceiling,  pthread_mutexattr_setprioceiling   —
14       get  and  set  the prioceiling attribute of the mutex attributes object
15       (REALTIME THREADS)
16

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

64       None.
65

APPLICATION USAGE

67       None.
68

RATIONALE

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

FUTURE DIRECTIONS

77       None.
78

SEE ALSO

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