1PTHREAD_MUTEX_GETPRIOCEILINGP(OPS)IX Programmer's MaPnTuHaRlEAD_MUTEX_GETPRIOCEILING(P)
2
3
4
6 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling - get and
7 set the priority ceiling of a mutex (REALTIME THREADS)
8
10 #include <pthread.h>
11
12 int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict mutex,
13 int *restrict prioceiling);
14 int pthread_mutex_setprioceiling(pthread_mutex_t *restrict mutex,
15 int prioceiling, int *restrict old_ceiling);
16
17
19 The pthread_mutex_getprioceiling() function shall return the current
20 priority ceiling of the mutex.
21
22 The pthread_mutex_setprioceiling() function shall either lock the mutex
23 if it is unlocked, or block until it can successfully lock the mutex,
24 then it shall change the mutex's priority ceiling and release the
25 mutex. When the change is successful, the previous value of the prior‐
26 ity ceiling shall be returned in old_ceiling. The process of locking
27 the mutex need not adhere to the priority protect protocol.
28
29 If the pthread_mutex_setprioceiling() function fails, the mutex prior‐
30 ity ceiling shall not be changed.
31
33 If successful, the pthread_mutex_getprioceiling() and
34 pthread_mutex_setprioceiling() functions shall return zero; otherwise,
35 an error number shall be returned to indicate the error.
36
38 The pthread_mutex_getprioceiling() and pthread_mutex_setprioceiling()
39 functions may fail if:
40
41 EINVAL The priority requested by prioceiling is out of range.
42
43 EINVAL The value specified by mutex does not refer to a currently
44 existing mutex.
45
46 EPERM The caller does not have the privilege to perform the operation.
47
48
49 These functions shall not return an error code of [EINTR].
50
51 The following sections are informative.
52
54 None.
55
57 None.
58
60 None.
61
63 None.
64
66 pthread_mutex_destroy() , pthread_mutex_lock() , pthread_mutex_timed‐
67 lock() , the Base Definitions volume of IEEE Std 1003.1-2001,
68 <pthread.h>
69
71 Portions of this text are reprinted and reproduced in electronic form
72 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
73 -- Portable Operating System Interface (POSIX), The Open Group Base
74 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
75 Electrical and Electronics Engineers, Inc and The Open Group. In the
76 event of any discrepancy between this version and the original IEEE and
77 The Open Group Standard, the original IEEE and The Open Group Standard
78 is the referee document. The original Standard can be obtained online
79 at http://www.opengroup.org/unix/online.html .
80
81
82
83IEEE/The Open Group 2003 PTHREAD_MUTEX_GETPRIOCEILING(P)