~ubuntu-branches/ubuntu/precise/manpages-posix/precise

1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
1
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
2 by Francesco Paolo Lovergine
* Alligned to linux main manpages edition.
2
.TH "PTHREAD_MUTEX_GETPRIOCEILING" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
3
.\" pthread_mutex_getprioceiling 
4
.SH NAME
5
pthread_mutex_getprioceiling, pthread_mutex_setprioceiling \- get and
6
set the priority ceiling of a mutex (\fBREALTIME
7
THREADS\fP)
8
.SH SYNOPSIS
9
.LP
10
\fB#include <pthread.h>
11
.br
12
.sp
13
int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict\fP
14
\fImutex\fP\fB,
15
.br
16
\ \ \ \ \ \  int *restrict\fP \fIprioceiling\fP\fB);
17
.br
18
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict\fP \fImutex\fP\fB,
19
.br
20
\ \ \ \ \ \  int\fP \fIprioceiling\fP\fB, int *restrict\fP \fIold_ceiling\fP\fB);
21
\fP
22
\fB
23
.br
24
\fP
25
.SH DESCRIPTION
26
.LP
27
The \fIpthread_mutex_getprioceiling\fP() function shall return the
28
current priority ceiling of the mutex.
29
.LP
30
The \fIpthread_mutex_setprioceiling\fP() function shall either lock
31
the mutex if it is unlocked, or block until it can
32
successfully lock the mutex, then it shall change the mutex's priority
33
ceiling and release the mutex. When the change is
34
successful, the previous value of the priority ceiling shall be returned
35
in \fIold_ceiling\fP. The process of locking the mutex
36
need not adhere to the priority protect protocol.
37
.LP
38
If the \fIpthread_mutex_setprioceiling\fP() function fails, the mutex
39
priority ceiling shall not be changed.
40
.SH RETURN VALUE
41
.LP
42
If successful, the \fIpthread_mutex_getprioceiling\fP() and \fIpthread_mutex_setprioceiling\fP()
43
functions shall return zero;
44
otherwise, an error number shall be returned to indicate the error.
45
.SH ERRORS
46
.LP
47
The \fIpthread_mutex_getprioceiling\fP() and \fIpthread_mutex_setprioceiling\fP()
48
functions may fail if:
49
.TP 7
50
.B EINVAL
51
The priority requested by \fIprioceiling\fP is out of range.
52
.TP 7
53
.B EINVAL
54
The value specified by \fImutex\fP does not refer to a currently existing
55
mutex.
56
.TP 7
57
.B EPERM
58
The caller does not have the privilege to perform the operation.
59
.sp
60
.LP
61
These functions shall not return an error code of [EINTR].
62
.LP
63
\fIThe following sections are informative.\fP
64
.SH EXAMPLES
65
.LP
66
None.
67
.SH APPLICATION USAGE
68
.LP
69
None.
70
.SH RATIONALE
71
.LP
72
None.
73
.SH FUTURE DIRECTIONS
74
.LP
75
None.
76
.SH SEE ALSO
77
.LP
78
\fIpthread_mutex_destroy\fP() , \fIpthread_mutex_lock\fP() , \fIpthread_mutex_timedlock\fP()
79
, the Base Definitions volume of
80
IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
81
.SH COPYRIGHT
82
Portions of this text are reprinted and reproduced in electronic form
83
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
84
-- Portable Operating System Interface (POSIX), The Open Group Base
85
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
86
Electrical and Electronics Engineers, Inc and The Open Group. In the
87
event of any discrepancy between this version and the original IEEE and
88
The Open Group Standard, the original IEEE and The Open Group Standard
89
is the referee document. The original Standard can be obtained online at
90
http://www.opengroup.org/unix/online.html .