man-pages/man3/pthread_mutex_consistent.3

58 lines
2.1 KiB
Groff
Raw Normal View History

.\" 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
.\"
.TH PTHREAD_MUTEXATTR_SETROBUST 3 2017-08-20 "Linux" "Linux Programmer's Manual"
.SH NAME
pthread_mutex_consistent \- make the robust mutex consistent
.SH SYNOPSIS
.nf
.B #include <pthread.h>
.PP
.BI "int pthread_mute_consistent(pthread_mute_t *" mutex ");"
.fi
.PP
Compile and link with \fI\-pthread\fP.
.SH DESCRIPTION
This function make a robust mutex consistent if it is in a inconsistent
state. A mutex can be left in a inconsistent state if its owner terminate
while holding the mutex, in which situation the next owner who acquire the
mutex will succeed and be notified by the return value of
.B EOWNERDEAD.
.SH RETURN VALUE
On success,
.IR pthread_mutex_consistent()
return 0. Otherwise an error value is returned to indicate the error.
.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)