logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pthread_mutex_consistent.3p (4082B)


  1. '\" et
  2. .TH PTHREAD_MUTEX_CONSISTENT "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. pthread_mutex_consistent \(em
  12. mark state protected by robust mutex as consistent
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <pthread.h>
  17. .P
  18. int pthread_mutex_consistent(pthread_mutex_t *\fImutex\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. If
  22. .IR mutex
  23. is a robust mutex in an inconsistent state, the
  24. \fIpthread_mutex_consistent\fR()
  25. function can be used to mark the state protected by the mutex
  26. referenced by
  27. .IR mutex
  28. as consistent again.
  29. .P
  30. If an owner of a robust mutex terminates while holding the mutex, the
  31. mutex becomes inconsistent and the next thread that acquires the mutex
  32. lock shall be notified of the state by the return value
  33. .BR [EOWNERDEAD] .
  34. In this case, the mutex does not become normally usable again until the
  35. state is marked consistent.
  36. .P
  37. If the thread which acquired the mutex lock with the return value
  38. .BR [EOWNERDEAD]
  39. terminates before calling either
  40. \fIpthread_mutex_consistent\fR()
  41. or
  42. \fIpthread_mutex_unlock\fR(),
  43. the next thread that acquires the mutex lock shall be notified about
  44. the state of the mutex by the return value
  45. .BR [EOWNERDEAD] .
  46. .P
  47. The behavior is undefined if the value specified by the
  48. .IR mutex
  49. argument to
  50. \fIpthread_mutex_consistent\fR()
  51. does not refer to an initialized mutex.
  52. .SH "RETURN VALUE"
  53. Upon successful completion, the
  54. \fIpthread_mutex_consistent\fR()
  55. function shall return zero. Otherwise, an error value shall be returned
  56. to indicate the error.
  57. .SH ERRORS
  58. The
  59. \fIpthread_mutex_consistent\fR()
  60. function shall fail if:
  61. .TP
  62. .BR EINVAL
  63. The mutex object referenced by
  64. .IR mutex
  65. is not robust or does not protect an inconsistent state.
  66. .P
  67. These functions shall not return an error code of
  68. .BR [EINTR] .
  69. .LP
  70. .IR "The following sections are informative."
  71. .SH EXAMPLES
  72. None.
  73. .SH "APPLICATION USAGE"
  74. The
  75. \fIpthread_mutex_consistent\fR()
  76. function is only responsible for notifying the implementation that the
  77. state protected by the mutex has been recovered and that normal
  78. operations with the mutex can be resumed. It is the responsibility of
  79. the application to recover the state so it can be reused. If the
  80. application is not able to perform the recovery, it can notify the
  81. implementation that the situation is unrecoverable by a call to
  82. \fIpthread_mutex_unlock\fR()
  83. without a prior call to
  84. \fIpthread_mutex_consistent\fR(),
  85. in which case subsequent threads that attempt to lock the mutex will
  86. fail to acquire the lock and be returned
  87. .BR [ENOTRECOVERABLE] .
  88. .SH RATIONALE
  89. If an implementation detects that the value specified by the
  90. .IR mutex
  91. argument to
  92. \fIpthread_mutex_consistent\fR()
  93. does not refer to an initialized mutex, it is recommended that the
  94. function should fail and report an
  95. .BR [EINVAL]
  96. error.
  97. .SH "FUTURE DIRECTIONS"
  98. None.
  99. .SH "SEE ALSO"
  100. .IR "\fIpthread_mutex_lock\fR\^(\|)",
  101. .IR "\fIpthread_mutexattr_getrobust\fR\^(\|)"
  102. .P
  103. The Base Definitions volume of POSIX.1\(hy2017,
  104. .IR "\fB<pthread.h>\fP"
  105. .\"
  106. .SH COPYRIGHT
  107. Portions of this text are reprinted and reproduced in electronic form
  108. from IEEE Std 1003.1-2017, Standard for Information Technology
  109. -- Portable Operating System Interface (POSIX), The Open Group Base
  110. Specifications Issue 7, 2018 Edition,
  111. Copyright (C) 2018 by the Institute of
  112. Electrical and Electronics Engineers, Inc and The Open Group.
  113. In the event of any discrepancy between this version and the original IEEE and
  114. The Open Group Standard, the original IEEE and The Open Group Standard
  115. is the referee document. The original Standard can be obtained online at
  116. http://www.opengroup.org/unix/online.html .
  117. .PP
  118. Any typographical or formatting errors that appear
  119. in this page are most likely
  120. to have been introduced during the conversion of the source files to
  121. man page format. To report such errors, see
  122. https://www.kernel.org/doc/man-pages/reporting_bugs.html .