1pthread_mutexattr_getpriocSetialnidnagr(d3CC)LibraryptFhurnecatdi_omnustexattr_getprioceiling(3C)
2
3
4

NAME

6       pthread_mutexattr_getprioceiling,   pthread_mutexattr_setprioceiling  -
7       get or set prioceiling attribute of mutex attribute object
8

SYNOPSIS

10       cc -mt [ flag... ] file... -lpthread [ library... ]
11       #include <pthread.h>
12
13       int pthread_mutexattr_getprioceiling(
14            const pthread_mutexattr_t *restrict attr,
15            int *restrict prioceiling);
16
17
18       int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
19            int prioceiling);
20
21

DESCRIPTION

23       The pthread_mutexattr_getprioceiling()  and  pthread_mutexattr_setprio‐
24       ceiling()  functions,  respectively,  get  and set the priority ceiling
25       attribute of a mutex attribute object pointed to  by  attr,  which  was
26       previously created by the pthread_mutexattr_init() function.
27
28
29       The  prioceiling attribute contains the priority ceiling of initialized
30       mutexes. The values of prioceiling must be within the range of  priori‐
31       ties defined by SCHED_FIFO.
32
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 must be set to a  priority
38       higher  than  or  equal to the highest priority of all the threads that
39       may lock that mutex.
40
41
42       The ceiling value should be drawn from the range of priorities for  the
43       SCHED_FIFO  policy.  When a thread acquires such a mutex, the policy of
44       the thread at mutex acquisition should match that from which the  ceil‐
45       ing  value  was  derived  (SCHED_FIFO,  in  this  case).    If a thread
46       changes its scheduling  policy  while  holding  a  ceiling  mutex,  the
47       behavior  of  pthread_mutex_lock()  and  pthread_mutex_unlock() on this
48       mutex is undefined. See pthread_mutex_lock(3C).
49

RETURN VALUES

51       Upon successful completion, the pthread_mutexattr_getprioceiling()  and
52       pthread_mutexattr_setprioceiling()  functions  return  0. Otherwise, an
53       error number is returned to indicate the error.
54

ERRORS

56       The pthread_mutexattr_setprioceiling() function will fail if:
57
58       EINVAL    The value  specified  by  attr  is  NULL  or  prioceiling  is
59                 invalid.
60
61
62
63       The  pthread_mutexattr_getprioceiling()  and pthread_mutexattr_setprio‐
64       ceiling() functions may fail if:
65
66       EINVAL    The value specified by attr or prioceiling is invalid.
67
68
69       EPERM     The caller does not have the privilege to perform the  opera‐
70                 tion.
71
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │Committed                    │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │MT-Level                     │MT-Safe                      │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │Standard                     │See standards(5).            │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       pthread_cond_init(3C),    pthread_create(3C),   pthread_mutex_init(3C),
91       pthread_mutex_lock(3C),   sched_get_priority_min(3C),    attributes(5),
92       standards(5)
93
94
95
96SunOS 5.11                        1 Apr 200p8thread_mutexattr_getprioceiling(3C)
Impressum