---
name: "pthread_mutex_consistent"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/pthread_mutex_consistent"
---

# pthread\_mutex\_consistent(3)

mark state protected by robust mutex as consistent

## NAME

**pthread\_mutex\_consistent** – mark state protected by robust mutex as consistent

## LIBRARY

POSIX Threads Library (libpthread, -lpthread)

## SYNOPSIS

**#include \<pthread.h\>**

*int*\

**pthread\_mutex\_consistent**(*pthread\_mutex\_t \*mutex*);

## DESCRIPTION

If the process containing the thread owning a robust mutex terminates while holding the mutex, the mutex becomes inconsistent and the next thread that acquires the mutex 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 mutex as consistent again. The consequent unlock of the mutex, by either **pthread\_mutex\_unlock**() or other methods, allows other contenders 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 robust, or is not in the inconsistent state.

## SEE ALSO

[pthread\_mutex\_init(3)](/pthread_mutex_init/3.md), [pthread\_mutex\_lock(3)](/pthread_mutex_lock/3.md), [pthread\_mutex\_unlock(3)](/pthread_mutex_unlock/3.md), [pthread\_mutexattr\_setrobust(3)](/pthread_mutexattr_setrobust/3.md)

## STANDARDS

The **pthread\_mutex\_lock**() function conforms to Version 4 of the Single UNIX Specification (“SUSv4”).
