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_mutexattr_getprioceiling.3p (4041B)


  1. '\" et
  2. .TH PTHREAD_MUTEXATTR_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_mutexattr_getprioceiling,
  12. pthread_mutexattr_setprioceiling
  13. \(em get and set the prioceiling attribute of the mutex attributes object
  14. (\fBREALTIME THREADS\fP)
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <pthread.h>
  19. .P
  20. int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t
  21. *restrict \fIattr\fP, int *restrict \fIprioceiling\fP);
  22. int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *\fIattr\fP,
  23. int \fIprioceiling\fP);
  24. .fi
  25. .SH DESCRIPTION
  26. The
  27. \fIpthread_mutexattr_getprioceiling\fR()
  28. and
  29. \fIpthread_mutexattr_setprioceiling\fR()
  30. functions, respectively, shall get and set the priority ceiling
  31. attribute of a mutex attributes object pointed to by
  32. .IR attr
  33. which was previously created by the function
  34. \fIpthread_mutexattr_init\fR().
  35. .P
  36. The
  37. .IR prioceiling
  38. attribute contains the priority ceiling of initialized mutexes. The
  39. values of
  40. .IR prioceiling
  41. are within the maximum range of priorities defined by SCHED_FIFO.
  42. .P
  43. The
  44. .IR prioceiling
  45. attribute defines the priority ceiling of initialized mutexes, which is
  46. the minimum priority level at which the critical section guarded by the
  47. mutex is executed. In order to avoid priority inversion, the priority
  48. ceiling of the mutex shall be set to a priority higher than or equal to
  49. the highest priority of all the threads that may lock that mutex. The
  50. values of
  51. .IR prioceiling
  52. are within the maximum range of priorities defined under the SCHED_FIFO
  53. scheduling policy.
  54. .P
  55. The behavior is undefined if the value specified by the
  56. .IR attr
  57. argument to
  58. \fIpthread_mutexattr_getprioceiling\fR()
  59. or
  60. \fIpthread_mutexattr_setprioceiling\fR()
  61. does not refer to an initialized mutex attributes object.
  62. .SH "RETURN VALUE"
  63. Upon successful completion, the
  64. \fIpthread_mutexattr_getprioceiling\fR()
  65. and
  66. \fIpthread_mutexattr_setprioceiling\fR()
  67. functions shall return zero; otherwise, an error number shall be
  68. returned to indicate the error.
  69. .SH ERRORS
  70. These functions may fail if:
  71. .TP
  72. .BR EINVAL
  73. The value specified by
  74. .IR prioceiling
  75. is invalid.
  76. .TP
  77. .BR EPERM
  78. The caller does not have the privilege to perform the operation.
  79. .P
  80. These functions shall not return an error code of
  81. .BR [EINTR] .
  82. .LP
  83. .IR "The following sections are informative."
  84. .SH EXAMPLES
  85. None.
  86. .SH "APPLICATION USAGE"
  87. None.
  88. .SH RATIONALE
  89. If an implementation detects that the value specified by the
  90. .IR attr
  91. argument to
  92. \fIpthread_mutexattr_getprioceiling\fR()
  93. or
  94. \fIpthread_mutexattr_setprioceiling\fR()
  95. does not refer to an initialized mutex attributes object, it is
  96. recommended that the function should fail and report an
  97. .BR [EINVAL]
  98. error.
  99. .SH "FUTURE DIRECTIONS"
  100. None.
  101. .SH "SEE ALSO"
  102. .IR "\fIpthread_cond_destroy\fR\^(\|)",
  103. .IR "\fIpthread_create\fR\^(\|)",
  104. .IR "\fIpthread_mutex_destroy\fR\^(\|)"
  105. .P
  106. The Base Definitions volume of POSIX.1\(hy2017,
  107. .IR "\fB<pthread.h>\fP"
  108. .\"
  109. .SH COPYRIGHT
  110. Portions of this text are reprinted and reproduced in electronic form
  111. from IEEE Std 1003.1-2017, Standard for Information Technology
  112. -- Portable Operating System Interface (POSIX), The Open Group Base
  113. Specifications Issue 7, 2018 Edition,
  114. Copyright (C) 2018 by the Institute of
  115. Electrical and Electronics Engineers, Inc and The Open Group.
  116. In the event of any discrepancy between this version and the original IEEE and
  117. The Open Group Standard, the original IEEE and The Open Group Standard
  118. is the referee document. The original Standard can be obtained online at
  119. http://www.opengroup.org/unix/online.html .
  120. .PP
  121. Any typographical or formatting errors that appear
  122. in this page are most likely
  123. to have been introduced during the conversion of the source files to
  124. man page format. To report such errors, see
  125. https://www.kernel.org/doc/man-pages/reporting_bugs.html .