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_attr_getinheritsched.3p (4655B)


  1. '\" et
  2. .TH PTHREAD_ATTR_GETINHERITSCHED "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_attr_getinheritsched,
  12. pthread_attr_setinheritsched
  13. \(em get and set the inheritsched attribute
  14. (\fBREALTIME THREADS\fP)
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <pthread.h>
  19. .P
  20. int pthread_attr_getinheritsched(const pthread_attr_t *restrict \fIattr\fP,
  21. int *restrict \fIinheritsched\fP);
  22. int pthread_attr_setinheritsched(pthread_attr_t *\fIattr\fP,
  23. int \fIinheritsched\fP);
  24. .fi
  25. .SH DESCRIPTION
  26. The
  27. \fIpthread_attr_getinheritsched\fR()
  28. and
  29. \fIpthread_attr_setinheritsched\fR()
  30. functions, respectively, shall get and set the
  31. .IR inheritsched
  32. attribute in the
  33. .IR attr
  34. argument.
  35. .P
  36. When the attributes objects are used by
  37. \fIpthread_create\fR(),
  38. the
  39. .IR inheritsched
  40. attribute determines how the other scheduling attributes of the created
  41. thread shall be set.
  42. .P
  43. The supported values of
  44. .IR inheritsched
  45. shall be:
  46. .IP PTHREAD_INHERIT_SCHED 6
  47. .br
  48. Specifies that the thread scheduling attributes shall be inherited from
  49. the creating thread, and the scheduling attributes in this
  50. .IR attr
  51. argument shall be ignored.
  52. .IP PTHREAD_EXPLICIT_SCHED 6
  53. .br
  54. Specifies that the thread scheduling attributes shall be set to the
  55. corresponding values from this attributes object.
  56. .P
  57. The symbols PTHREAD_INHERIT_SCHED and PTHREAD_EXPLICIT_SCHED are
  58. defined in the
  59. .IR <pthread.h>
  60. header.
  61. .P
  62. The following thread scheduling attributes defined by POSIX.1\(hy2008 are
  63. affected by the
  64. .IR inheritsched
  65. attribute: scheduling policy (\c
  66. .IR schedpolicy ),
  67. scheduling parameters (\c
  68. .IR schedparam ),
  69. and scheduling contention scope (\c
  70. .IR contentionscope ).
  71. .P
  72. The behavior is undefined if the value specified by the
  73. .IR attr
  74. argument to
  75. \fIpthread_attr_getinheritsched\fR()
  76. or
  77. \fIpthread_attr_setinheritsched\fR()
  78. does not refer to an initialized thread attributes object.
  79. .SH "RETURN VALUE"
  80. If successful, the
  81. \fIpthread_attr_getinheritsched\fR()
  82. and
  83. \fIpthread_attr_setinheritsched\fR()
  84. functions shall return zero; otherwise, an error number shall be
  85. returned to indicate the error.
  86. .SH ERRORS
  87. The
  88. \fIpthread_attr_setinheritsched\fR()
  89. function shall fail if:
  90. .TP
  91. .BR ENOTSUP
  92. An attempt was made to set the attribute to an unsupported value.
  93. .P
  94. The
  95. \fIpthread_attr_setinheritsched\fR()
  96. function may fail if:
  97. .TP
  98. .BR EINVAL
  99. The value of
  100. .IR inheritsched
  101. is not valid.
  102. .P
  103. These functions shall not return an error code of
  104. .BR [EINTR] .
  105. .LP
  106. .IR "The following sections are informative."
  107. .SH EXAMPLES
  108. None.
  109. .SH "APPLICATION USAGE"
  110. After these attributes have been set, a thread can be created with the
  111. specified attributes using
  112. \fIpthread_create\fR().
  113. Using these routines does not affect the current running thread.
  114. .P
  115. See
  116. .IR "Section 2.9.4" ", " "Thread Scheduling"
  117. for further details on thread scheduling attributes and their default
  118. settings.
  119. .SH RATIONALE
  120. If an implementation detects that the value specified by the
  121. .IR attr
  122. argument to
  123. \fIpthread_attr_getinheritsched\fR()
  124. or
  125. \fIpthread_attr_setinheritsched\fR()
  126. does not refer to an initialized thread attributes object, it is
  127. recommended that the function should fail and report an
  128. .BR [EINVAL]
  129. error.
  130. .SH "FUTURE DIRECTIONS"
  131. None.
  132. .SH "SEE ALSO"
  133. .ad l
  134. .IR "\fIpthread_attr_destroy\fR\^(\|)",
  135. .IR "\fIpthread_attr_getscope\fR\^(\|)",
  136. .IR "\fIpthread_attr_getschedpolicy\fR\^(\|)",
  137. .IR "\fIpthread_attr_getschedparam\fR\^(\|)",
  138. .IR "\fIpthread_create\fR\^(\|)"
  139. .ad b
  140. .P
  141. The Base Definitions volume of POSIX.1\(hy2017,
  142. .IR "\fB<pthread.h>\fP",
  143. .IR "\fB<sched.h>\fP"
  144. .\"
  145. .SH COPYRIGHT
  146. Portions of this text are reprinted and reproduced in electronic form
  147. from IEEE Std 1003.1-2017, Standard for Information Technology
  148. -- Portable Operating System Interface (POSIX), The Open Group Base
  149. Specifications Issue 7, 2018 Edition,
  150. Copyright (C) 2018 by the Institute of
  151. Electrical and Electronics Engineers, Inc and The Open Group.
  152. In the event of any discrepancy between this version and the original IEEE and
  153. The Open Group Standard, the original IEEE and The Open Group Standard
  154. is the referee document. The original Standard can be obtained online at
  155. http://www.opengroup.org/unix/online.html .
  156. .PP
  157. Any typographical or formatting errors that appear
  158. in this page are most likely
  159. to have been introduced during the conversion of the source files to
  160. man page format. To report such errors, see
  161. https://www.kernel.org/doc/man-pages/reporting_bugs.html .