2017-09-11 12:50:12 +00:00
|
|
|
.\" Copyright (c) 2017, Yubin Ruan <ablacktshirt@gmail.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
2017-09-12 11:37:12 +00:00
|
|
|
.TH PTHREAD_MUTEX_CONSISTENT 3 2017-08-20 "Linux" "Linux Programmer's Manual"
|
2017-09-11 12:50:12 +00:00
|
|
|
.SH NAME
|
2017-09-12 11:37:12 +00:00
|
|
|
pthread_mutex_consistent \- make a robust mutex consistent
|
2017-09-11 12:50:12 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <pthread.h>
|
|
|
|
.PP
|
2017-09-12 11:37:12 +00:00
|
|
|
.BI "int pthread_mutex_consistent(pthread_mutex_t *" mutex ");"
|
2017-09-11 12:50:12 +00:00
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Compile and link with \fI\-pthread\fP.
|
|
|
|
.SH DESCRIPTION
|
2017-09-12 11:37:12 +00:00
|
|
|
This function makes a robust mutex consistent if it is in a inconsistent
|
|
|
|
state. A mutex can be left in a inconsistent state if its owner terminates
|
|
|
|
while holding the mutex, in which case the next owner who acquires the
|
2017-09-11 12:50:12 +00:00
|
|
|
mutex will succeed and be notified by the return value of
|
2017-09-12 11:37:12 +00:00
|
|
|
.BR EOWNERDEAD .
|
2017-09-11 12:50:12 +00:00
|
|
|
.SH RETURN VALUE
|
|
|
|
On success,
|
|
|
|
.IR pthread_mutex_consistent()
|
2017-09-12 11:37:12 +00:00
|
|
|
returns 0. Otherwise, an error value is returned to indicate the error.
|
2017-09-11 12:50:12 +00:00
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
The mutex is either not robust or it is not in a inconsistent state.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.ad l
|
|
|
|
.nh
|
|
|
|
.BR pthread_mutexattr_init (3),
|
|
|
|
.BR pthread_mutex_lock (3),
|
|
|
|
.BR pthread_mutexattr_setrobust (3),
|
|
|
|
.BR pthread_mutexattr_getrobust (3),
|
|
|
|
.BR pthreads (7)
|