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_getprioceiling.3p (4776B)


  1. '\" et
  2. .TH PTHREAD_MUTEX_GETPRIOCEILING "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_getprioceiling,
  12. pthread_mutex_setprioceiling
  13. \(em get and set the priority ceiling of a mutex
  14. (\fBREALTIME THREADS\fP)
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <pthread.h>
  19. .P
  20. int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict \fImutex\fP,
  21. int *restrict \fIprioceiling\fP);
  22. int pthread_mutex_setprioceiling(pthread_mutex_t *restrict \fImutex\fP,
  23. int \fIprioceiling\fP, int *restrict \fIold_ceiling\fP);
  24. .fi
  25. .SH DESCRIPTION
  26. The
  27. \fIpthread_mutex_getprioceiling\fR()
  28. function shall return the current priority ceiling of the mutex.
  29. .P
  30. The
  31. \fIpthread_mutex_setprioceiling\fR()
  32. function shall attempt to lock the mutex as if by a call to
  33. \fIpthread_mutex_lock\fR(),
  34. except that the process of locking the mutex need not adhere to the
  35. priority protect protocol. On acquiring the mutex it shall change the
  36. mutex's priority ceiling and then release the mutex as if by a call to
  37. \fIpthread_mutex_unlock\fR().
  38. When the change is successful, the previous value of the priority ceiling
  39. shall be returned in
  40. .IR old_ceiling .
  41. .P
  42. If the
  43. \fIpthread_mutex_setprioceiling\fR()
  44. function fails, the mutex priority ceiling shall not be changed.
  45. .SH "RETURN VALUE"
  46. If successful, the
  47. \fIpthread_mutex_getprioceiling\fR()
  48. and
  49. \fIpthread_mutex_setprioceiling\fR()
  50. functions shall return zero; otherwise, an error number shall be
  51. returned to indicate the error.
  52. .SH ERRORS
  53. These functions shall fail if:
  54. .TP
  55. .BR EINVAL
  56. The protocol attribute of
  57. .IR mutex
  58. is PTHREAD_PRIO_NONE.
  59. .TP
  60. .BR EPERM
  61. The implementation requires appropriate privileges to perform the
  62. operation and the caller does not have appropriate privileges.
  63. .P
  64. The
  65. \fIpthread_mutex_setprioceiling\fR()
  66. function shall fail if:
  67. .TP
  68. .BR EAGAIN
  69. The mutex could not be acquired because the maximum number of recursive
  70. locks for
  71. .IR mutex
  72. has been exceeded.
  73. .TP
  74. .BR EDEADLK
  75. The mutex type is PTHREAD_MUTEX_ERRORCHECK and the current
  76. thread already owns the mutex.
  77. .TP
  78. .BR EINVAL
  79. The mutex was created with the protocol attribute having the value
  80. PTHREAD_PRIO_PROTECT and the calling thread's priority is higher than
  81. the mutex's current priority ceiling, and the implementation adheres to
  82. the priority protect protocol in the process of locking the mutex.
  83. .TP
  84. .BR ENOTRECOVERABLE
  85. .br
  86. The mutex is a robust mutex and the state protected by the mutex is
  87. not recoverable.
  88. .TP
  89. .BR EOWNERDEAD
  90. .br
  91. The mutex is a robust mutex and the process containing the previous
  92. owning thread terminated while holding the mutex lock. The mutex lock
  93. shall be acquired by the calling thread and it is up to the new owner
  94. to make the state consistent (see
  95. .IR "\fIpthread_mutex_lock\fR\^(\|)").
  96. .P
  97. The
  98. \fIpthread_mutex_setprioceiling\fR()
  99. function may fail if:
  100. .TP
  101. .BR EDEADLK
  102. A deadlock condition was detected.
  103. .TP
  104. .BR EINVAL
  105. The priority requested by
  106. .IR prioceiling
  107. is out of range.
  108. .TP
  109. .BR EOWNERDEAD
  110. .br
  111. The mutex is a robust mutex and the previous owning thread terminated
  112. while holding the mutex lock. The mutex lock shall be acquired by the
  113. calling thread and it is up to the new owner to make the state
  114. consistent (see
  115. .IR "\fIpthread_mutex_lock\fR\^(\|)").
  116. .P
  117. These functions shall not return an error code of
  118. .BR [EINTR] .
  119. .LP
  120. .IR "The following sections are informative."
  121. .SH EXAMPLES
  122. None.
  123. .SH "APPLICATION USAGE"
  124. None.
  125. .SH RATIONALE
  126. None.
  127. .SH "FUTURE DIRECTIONS"
  128. None.
  129. .SH "SEE ALSO"
  130. .IR "\fIpthread_mutex_destroy\fR\^(\|)",
  131. .IR "\fIpthread_mutex_lock\fR\^(\|)",
  132. .IR "\fIpthread_mutex_timedlock\fR\^(\|)"
  133. .P
  134. The Base Definitions volume of POSIX.1\(hy2017,
  135. .IR "\fB<pthread.h>\fP"
  136. .\"
  137. .SH COPYRIGHT
  138. Portions of this text are reprinted and reproduced in electronic form
  139. from IEEE Std 1003.1-2017, Standard for Information Technology
  140. -- Portable Operating System Interface (POSIX), The Open Group Base
  141. Specifications Issue 7, 2018 Edition,
  142. Copyright (C) 2018 by the Institute of
  143. Electrical and Electronics Engineers, Inc and The Open Group.
  144. In the event of any discrepancy between this version and the original IEEE and
  145. The Open Group Standard, the original IEEE and The Open Group Standard
  146. is the referee document. The original Standard can be obtained online at
  147. http://www.opengroup.org/unix/online.html .
  148. .PP
  149. Any typographical or formatting errors that appear
  150. in this page are most likely
  151. to have been introduced during the conversion of the source files to
  152. man page format. To report such errors, see
  153. https://www.kernel.org/doc/man-pages/reporting_bugs.html .