]>
Commit | Line | Data |
---|---|---|
6d793426 YR |
1 | .\" Copyright (c) 2017, Yubin Ruan <ablacktshirt@gmail.com> |
2 | .\" | |
3 | .\" %%%LICENSE_START(VERBATIM) | |
4 | .\" Permission is granted to make and distribute verbatim copies of this | |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
23 | .\" %%%LICENSE_END | |
24 | .\" | |
fcc827bc | 25 | .TH PTHREAD_MUTEX_CONSISTENT 3 2017-08-20 "Linux" "Linux Programmer's Manual" |
6d793426 | 26 | .SH NAME |
fcc827bc | 27 | pthread_mutex_consistent \- make a robust mutex consistent |
6d793426 YR |
28 | .SH SYNOPSIS |
29 | .nf | |
30 | .B #include <pthread.h> | |
31 | .PP | |
fcc827bc | 32 | .BI "int pthread_mutex_consistent(pthread_mutex_t *" mutex ");" |
6d793426 YR |
33 | .fi |
34 | .PP | |
35 | Compile and link with \fI\-pthread\fP. | |
abdad185 MK |
36 | .PP |
37 | .in -4n | |
38 | Feature Test Macro Requirements for glibc (see | |
39 | .BR feature_test_macros (7)): | |
40 | .in | |
41 | .PP | |
42 | .BR pthread_mutex_consistent (): | |
43 | .br | |
44 | .RS 4 | |
45 | .ad l | |
46 | _POSIX_C_SOURCE >= 200809L | |
47 | .RE | |
48 | .ad | |
6d793426 | 49 | .SH DESCRIPTION |
fcc827bc | 50 | This function makes a robust mutex consistent if it is in a inconsistent |
da9fc029 MK |
51 | state. |
52 | A mutex can be left in a inconsistent state if its owner terminates | |
fcc827bc | 53 | while holding the mutex, in which case the next owner who acquires the |
6d793426 | 54 | mutex will succeed and be notified by the return value of |
fcc827bc | 55 | .BR EOWNERDEAD . |
6d793426 YR |
56 | .SH RETURN VALUE |
57 | On success, | |
58 | .IR pthread_mutex_consistent() | |
da9fc029 MK |
59 | returns 0. |
60 | Otherwise, an error value is returned to indicate the error. | |
6d793426 YR |
61 | .SH ERRORS |
62 | .TP | |
63 | .B EINVAL | |
64 | The mutex is either not robust or it is not in a inconsistent state. | |
abdad185 MK |
65 | .SH CONFORMING TO |
66 | POSIX.1-2008. | |
6d793426 YR |
67 | .SH SEE ALSO |
68 | .ad l | |
69 | .nh | |
70 | .BR pthread_mutexattr_init (3), | |
71 | .BR pthread_mutex_lock (3), | |
72 | .BR pthread_mutexattr_setrobust (3), | |
73 | .BR pthread_mutexattr_getrobust (3), | |
74 | .BR pthreads (7) |