sunos man page for pthread_mutex_consistent_np

Query: pthread_mutex_consistent_np

OS: sunos

Section: 3c

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

pthread_mutex_consistent_np(3C) 										   pthread_mutex_consistent_np(3C)

NAME
pthread_mutex_consistent_np - make a mutex consistent after owner death
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ] #include <pthread.h> int pthread_mutex_consistent_np(pthread_mutex_t *mutex); The following applies only if the symbol _POSIX_THREAD_PRIO_INHERIT is defined, and for mutexes that have been initialized with the proto- col attribute having the value PTHREAD_PRIO_INHERIT. See pthread_mutexattr_getprotocol(3C). The mutex object referenced by mutex is made consistent by calling pthread_mutex_consistent_np(). A consistent mutex becomes inconsistent and is unlocked if its owner dies while holding it. A subsequent owner of the mutex will acquire the mutex with pthread_mutex_lock(3C), which will return EOWNERDEAD to indicate that the acquired mutex is inconsistent. The pthread_mutex_consistent_np() function should be called while holding the mutex acquired by a previous call to pthread_mutex_lock()that returned EOWNERDEAD. Since the critical section protected by the mutex could have been left in an inconsistent state by the dead owner, the caller should make the mutex consistent only if it is able to make the critical section protected by the mutex consistent. Calls to pthread_mutex_lock(), pthread_mutex_unlock(), and pthread_mutex_trylock() for a consistent mutex will behave in the normal manner. The behavior of pthread_mutex_consistent_np() for a mutex which is not inconsistent, or which is not held, is undefined. Upon successful completion, the pthread_mutexattr_consistent_np() function returns 0. Otherwise, an error number is returned to indicate the error. The pthread_mutex_consistent_np() function will fail if: ENOSYS The option _POSIX_THREAD_PRIO_INHERIT is not defined and the implementation does not support the function. The pthread_mutex_consistent_np() function may fail if: EINVAL The value specified by mutex is invalid, or the mutex does not have the appropriate attributes. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level | MT-Safe | +-----------------------------+-----------------------------+ pthread_mutex_lock(3C), pthread_mutexattr_getprotocol(3C), pthread_mutexattr_getrobust_np(3C), attributes(5), mutex(5), standards(5) 23 Mar 2005 pthread_mutex_consistent_np(3C)
Related Man Pages
pthread_mutex_consistent_np(3c) - sunos
pthread_mutexattr_getrobust_np(3c) - sunos
pthread_mutex_trylock(3c) - sunos
pthread_mutex_consistent(3) - opensolaris
pthread_mutex_consistent_np(3) - linux
Similar Topics in the Unix Linux Community
pthread_rwlock_lock vs pthread_mutex_lock
Interesting issue with pthread_mutex_lock and siglongjmp in AIX 5.3 (and no other OS)
pthread and mutex question
C++ singleton
Check group consistencies