1PTHREAD_MUTEXATTR_GETPRIOCEIPLOISNIGX(PP)rogrammer'PsTHMRaEnAuDa_lMUTEXATTR_GETPRIOCEILING(P)
2
3
4
6 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling -
7 get and set the prioceiling attribute of the mutex attributes object
8 (REALTIME THREADS)
9
11 #include <pthread.h>
12
13 int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *
14 restrict attr, int *restrict prioceiling);
15 int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
16 int prioceiling);
17
18
20 The pthread_mutexattr_getprioceiling() and pthread_mutexattr_setprio‐
21 ceiling() functions, respectively, shall get and set the priority ceil‐
22 ing attribute of a mutex attributes object pointed to by attr which was
23 previously created by the function pthread_mutexattr_init().
24
25 The prioceiling attribute contains the priority ceiling of initialized
26 mutexes. The values of prioceiling are within the maximum range of pri‐
27 orities defined by SCHED_FIFO.
28
29 The prioceiling attribute defines the priority ceiling of initialized
30 mutexes, which is the minimum priority level at which the critical sec‐
31 tion guarded by the mutex is executed. In order to avoid priority
32 inversion, the priority ceiling of the mutex shall be set to a priority
33 higher than or equal to the highest priority of all the threads that
34 may lock that mutex. The values of prioceiling are within the maximum
35 range of priorities defined under the SCHED_FIFO scheduling policy.
36
38 Upon successful completion, the pthread_mutexattr_getprioceiling() and
39 pthread_mutexattr_setprioceiling() functions shall return zero; other‐
40 wise, an error number shall be returned to indicate the error.
41
43 The pthread_mutexattr_getprioceiling() and pthread_mutexattr_setprio‐
44 ceiling() functions may fail if:
45
46 EINVAL The value specified by attr or prioceiling is invalid.
47
48 EPERM The caller does not have the privilege to perform the operation.
49
50
51 These functions shall not return an error code of [EINTR].
52
53 The following sections are informative.
54
56 None.
57
59 None.
60
62 None.
63
65 None.
66
68 pthread_cond_destroy() , pthread_create() , pthread_mutex_destroy() ,
69 the Base Definitions volume of IEEE Std 1003.1-2001, <pthread.h>
70
72 Portions of this text are reprinted and reproduced in electronic form
73 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
74 -- Portable Operating System Interface (POSIX), The Open Group Base
75 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
76 Electrical and Electronics Engineers, Inc and The Open Group. In the
77 event of any discrepancy between this version and the original IEEE and
78 The Open Group Standard, the original IEEE and The Open Group Standard
79 is the referee document. The original Standard can be obtained online
80 at http://www.opengroup.org/unix/online.html .
81
82
83
84IEEE/The Open Group 2003 PTHREAD_MUTEXATTR_GETPRIOCEILING(P)