1PTHREAD_MUTEXATTR_GETPRIOCEIPLOISNIGX(3PPr)ogrammerP'TsHRMEaAnDu_aMlUTEXATTR_GETPRIOCEILING(3P)
2
3
4
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
12 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling -
13 get and set the prioceiling attribute of the mutex attributes object
14 (REALTIME THREADS)
15
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
24
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
44 Upon successful completion, the pthread_mutexattr_getprioceiling() and
45 pthread_mutexattr_setprioceiling() functions shall return zero; other‐
46 wise, an error number shall be returned to indicate the error.
47
49 The pthread_mutexattr_getprioceiling() and pthread_mutexattr_setprio‐
50 ceiling() functions may fail if:
51
52 EINVAL The value specified by attr or prioceiling is invalid.
53
54 EPERM The caller does not have the privilege to perform the operation.
55
56
57 These functions shall not return an error code of [EINTR].
58
59 The following sections are informative.
60
62 None.
63
65 None.
66
68 None.
69
71 None.
72
74 pthread_cond_destroy(), pthread_create(), pthread_mutex_destroy(), the
75 Base Definitions volume of IEEE Std 1003.1-2001, <pthread.h>
76
78 Portions of this text are reprinted and reproduced in electronic form
79 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
80 -- Portable Operating System Interface (POSIX), The Open Group Base
81 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
82 Electrical and Electronics Engineers, Inc and The Open Group. In the
83 event of any discrepancy between this version and the original IEEE and
84 The Open Group Standard, the original IEEE and The Open Group Standard
85 is the referee document. The original Standard can be obtained online
86 at http://www.opengroup.org/unix/online.html .
87
88
89
90IEEE/The Open Group 2003 PTHREAD_MUTEXATTR_GETPRIOCEILING(3P)