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_getschedparam.3p (4490B)


  1. '\" et
  2. .TH PTHREAD_ATTR_GETSCHEDPARAM "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_getschedparam,
  12. pthread_attr_setschedparam
  13. \(em get and set the schedparam attribute
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <pthread.h>
  18. .P
  19. int pthread_attr_getschedparam(const pthread_attr_t *restrict \fIattr\fP,
  20. struct sched_param *restrict \fIparam\fP);
  21. int pthread_attr_setschedparam(pthread_attr_t *restrict \fIattr\fP,
  22. const struct sched_param *restrict \fIparam\fP);
  23. .fi
  24. .SH DESCRIPTION
  25. The
  26. \fIpthread_attr_getschedparam\fR()
  27. and
  28. \fIpthread_attr_setschedparam\fR()
  29. functions, respectively, shall get and set the scheduling parameter
  30. attributes in the
  31. .IR attr
  32. argument. The contents of the
  33. .IR param
  34. structure are defined in the
  35. .IR <sched.h>
  36. header. For the SCHED_FIFO and SCHED_RR policies,
  37. the only required member of
  38. .IR param
  39. is
  40. .IR sched_priority .
  41. .P
  42. For the SCHED_SPORADIC policy, the required members of the
  43. .IR param
  44. structure are
  45. .IR sched_priority ,
  46. .IR sched_ss_low_priority ,
  47. .IR sched_ss_repl_period ,
  48. .IR sched_ss_init_budget ,
  49. and
  50. .IR sched_ss_max_repl .
  51. The specified
  52. .IR sched_ss_repl_period
  53. must be greater than or equal to the specified
  54. .IR sched_ss_init_budget
  55. for the function to succeed; if it is not, then the function shall
  56. fail. The value of
  57. .IR sched_ss_max_repl
  58. shall be within the inclusive range [1,\c
  59. {SS_REPL_MAX}]
  60. for the function to succeed; if not, the function shall fail.
  61. It is unspecified whether the
  62. .IR sched_ss_repl_period
  63. and
  64. .IR sched_ss_init_budget
  65. values are stored as provided by this function or are rounded to
  66. align with the resolution of the clock being used.
  67. .P
  68. The behavior is undefined if the value specified by the
  69. .IR attr
  70. argument to
  71. \fIpthread_attr_getschedparam\fR()
  72. or
  73. \fIpthread_attr_setschedparam\fR()
  74. does not refer to an initialized thread attributes object.
  75. .SH "RETURN VALUE"
  76. If successful, the
  77. \fIpthread_attr_getschedparam\fR()
  78. and
  79. \fIpthread_attr_setschedparam\fR()
  80. functions shall return zero; otherwise, an error number shall be
  81. returned to indicate the error.
  82. .SH ERRORS
  83. The
  84. \fIpthread_attr_setschedparam\fR()
  85. function shall fail if:
  86. .TP
  87. .BR ENOTSUP
  88. An attempt was made to set the attribute to an unsupported value.
  89. .P
  90. The
  91. \fIpthread_attr_setschedparam\fR()
  92. function may fail if:
  93. .TP
  94. .BR EINVAL
  95. The value of
  96. .IR param
  97. is not valid.
  98. .P
  99. These functions shall not return an error code of
  100. .BR [EINTR] .
  101. .LP
  102. .IR "The following sections are informative."
  103. .SH EXAMPLES
  104. None.
  105. .SH "APPLICATION USAGE"
  106. After these attributes have been set, a thread can be created with the
  107. specified attributes using
  108. \fIpthread_create\fR().
  109. Using these routines does not affect the current running thread.
  110. .SH RATIONALE
  111. If an implementation detects that the value specified by the
  112. .IR attr
  113. argument to
  114. \fIpthread_attr_getschedparam\fR()
  115. or
  116. \fIpthread_attr_setschedparam\fR()
  117. does not refer to an initialized thread attributes object, it is
  118. recommended that the function should fail and report an
  119. .BR [EINVAL]
  120. error.
  121. .SH "FUTURE DIRECTIONS"
  122. None.
  123. .SH "SEE ALSO"
  124. .ad l
  125. .IR "\fIpthread_attr_destroy\fR\^(\|)",
  126. .IR "\fIpthread_attr_getscope\fR\^(\|)",
  127. .IR "\fIpthread_attr_getinheritsched\fR\^(\|)",
  128. .IR "\fIpthread_attr_getschedpolicy\fR\^(\|)",
  129. .IR "\fIpthread_create\fR\^(\|)"
  130. .ad b
  131. .P
  132. The Base Definitions volume of POSIX.1\(hy2017,
  133. .IR "\fB<pthread.h>\fP",
  134. .IR "\fB<sched.h>\fP"
  135. .\"
  136. .SH COPYRIGHT
  137. Portions of this text are reprinted and reproduced in electronic form
  138. from IEEE Std 1003.1-2017, Standard for Information Technology
  139. -- Portable Operating System Interface (POSIX), The Open Group Base
  140. Specifications Issue 7, 2018 Edition,
  141. Copyright (C) 2018 by the Institute of
  142. Electrical and Electronics Engineers, Inc and The Open Group.
  143. In the event of any discrepancy between this version and the original IEEE and
  144. The Open Group Standard, the original IEEE and The Open Group Standard
  145. is the referee document. The original Standard can be obtained online at
  146. http://www.opengroup.org/unix/online.html .
  147. .PP
  148. Any typographical or formatting errors that appear
  149. in this page are most likely
  150. to have been introduced during the conversion of the source files to
  151. man page format. To report such errors, see
  152. https://www.kernel.org/doc/man-pages/reporting_bugs.html .