PTHREAD_MUTEX_CONSISTENT(3C) Standard C Library Functions
- mark state protected by robust mutex as
SYNOPSIS #include <pthread.h> int pthread_mutex_consistent
() function is used to indicate that a robust
lock that is in an inconsistent state no longer is.
A robust lock enters into an inconsistent state when a process or thread
holding a robust lock exits, such as by calling exit(2)
crashes without unlocking the lock. At that point, if another process or
thread is currently in a call, or calls pthread_mutex_lock(3C)
, it will
obtain the lock; however, the error code EOWNERDEAD will be returned. In
such cases, that thread will own the lock and must check and clean up any
inconsistent state that is protected by the lock. When finished, it must
() to indicate that it is in a consistent
If a process or thread obtains a robust lock while it is in an inconsistent
state and it crashes or terminates before marking the lock as consistent,
the next process or thread that obtains the lock will receive EOWNERDEAD.
Upon successful completion, the pthread_mutex_consistent
() returns zero and
as consistent. Callers of pthread_mutex_lock
() will not have
EOWNERDEAD returned until another process or thread exits without
unlocking. Upon failure, an error will be returned which corresponds to
one of the errors listed below.
() function will fail if:
is an uninitialized mutex, not a robust mutex, or
not in an inconsistent state.
INTERFACE STABILITY CommittedMT-LEVEL MT-Safe
SEE ALSO pthread_mutex_destroy(3C)
OmniOS December 22, 2014 OmniOS