Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PTHREAD_MUTEX_CONSIST... BSD Library Functions Manual PTHREAD_MUTEX_CONSIST...

NAME
     pthread_mutex_consistent -- mark state protected by robust	mutex as con-
     sistent

LIBRARY
     POSIX Threads Library (libpthread,	-lpthread)

SYNOPSIS
     #include <pthread.h>

     int
     pthread_mutex_consistent(pthread_mutex_t *mutex);

DESCRIPTION
     If	the thread owning a robust mutex terminates while holding the mutex,
     the mutex becomes inconsistent and	the next thread	that acquires the mu-
     tex lock is notified of the state by the return value EOWNERDEAD.	In
     this case,	the mutex does not become normally usable again	until the
     state is marked consistent.

     The pthread_mutex_consistent(), when called with the mutex	argument,
     which points to the initialized robust mutex in an	inconsistent state,
     marks the by mutex	as consistent again.  The consequent unlock of the mu-
     tex, by either pthread_mutex_unlock() or other methods, allows other con-
     tenders to	lock the mutex.

     If	the mutex in the inconsistent state is not marked consistent by	the
     call to pthread_mutex_consistent()	before unlock, further attempts	to
     lock the mutex result in the ENOTRECOVERABLE condition reported by	the
     locking functions.

RETURN VALUES
     If	successful, pthread_mutex_consistent() will return zero, otherwise an
     error number will be returned to indicate the error.

ERRORS
     The pthread_mutex_lock() function will fail if:

     [EINVAL]		The mutex pointed to by	the mutex argument is not ro-
			bust, or is not	in the inconsistent state.

SEE ALSO
     pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3),
     pthread_mutexattr_setrobust(3)

STANDARDS
     The pthread_mutex_lock() function conforms	to .

BSD				March 27, 2017				   BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO | STANDARDS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=pthread_mutex_consistent&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help