]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/pthread_mutex_consistent.3
pthread_mutex_consistent_np.3: New link to new pthread_mutex_consistent.3 page
[thirdparty/man-pages.git] / man3 / pthread_mutex_consistent.3
CommitLineData
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 27pthread_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
35Compile and link with \fI\-pthread\fP.
abdad185
MK
36.PP
37.in -4n
38Feature 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 50This function makes a robust mutex consistent if it is in a inconsistent
da9fc029
MK
51state.
52A mutex can be left in a inconsistent state if its owner terminates
fcc827bc 53while holding the mutex, in which case the next owner who acquires the
6d793426 54mutex will succeed and be notified by the return value of
fcc827bc 55.BR EOWNERDEAD .
6d793426
YR
56.SH RETURN VALUE
57On success,
58.IR pthread_mutex_consistent()
da9fc029
MK
59returns 0.
60Otherwise, an error value is returned to indicate the error.
6d793426
YR
61.SH ERRORS
62.TP
63.B EINVAL
64The mutex is either not robust or it is not in a inconsistent state.
5214dd20
MK
65.SH VERSIONS
66.BR pthread_mutex_consistent ()
67was added to glibc in version 2.12.
abdad185
MK
68.SH CONFORMING TO
69POSIX.1-2008.
99fa587d
MK
70.SH NOTES
71Before the addition of
72.BR pthread_mutex_consistent ()
73to POSIX,
74glibc defined the following equivalent nonstandard function if
75.BR _GNU_SOURCE
76was defined:
77.PP
78.nf
79.BI "int pthread_mutex_consistent(const pthread_mutex_t *" mutex );
80.fi
81.PP
82This GNU-specific API, which first appeared in glibc 2.4,
83is nowadays obsolete and should not be used in new programs.
6d793426
YR
84.SH SEE ALSO
85.ad l
86.nh
87.BR pthread_mutexattr_init (3),
88.BR pthread_mutex_lock (3),
89.BR pthread_mutexattr_setrobust (3),
90.BR pthread_mutexattr_getrobust (3),
91.BR pthreads (7)