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

sched_getscheduler.3p (2856B)


  1. '\" et
  2. .TH SCHED_GETSCHEDULER "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. sched_getscheduler
  12. \(em get scheduling policy
  13. (\fBREALTIME\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <sched.h>
  18. .P
  19. int sched_getscheduler(pid_t \fIpid\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIsched_getscheduler\fR()
  24. function shall return the scheduling policy of the process specified by
  25. .IR pid .
  26. If the value of
  27. .IR pid
  28. is negative, the behavior of the
  29. \fIsched_getscheduler\fR()
  30. function is unspecified.
  31. .P
  32. The values that can be returned by
  33. \fIsched_getscheduler\fR()
  34. are defined in the
  35. .IR <sched.h>
  36. header.
  37. .P
  38. If a process specified by
  39. .IR pid
  40. exists, and if the calling process has permission, the scheduling
  41. policy shall be returned for the process whose process ID is equal to
  42. .IR pid .
  43. .P
  44. If
  45. .IR pid
  46. is zero, the scheduling policy shall be returned for the calling process.
  47. .SH "RETURN VALUE"
  48. Upon successful completion, the
  49. \fIsched_getscheduler\fR()
  50. function shall return the scheduling policy of the specified process.
  51. If unsuccessful, the function shall return \-1 and set
  52. .IR errno
  53. to indicate the error.
  54. .SH ERRORS
  55. The
  56. \fIsched_getscheduler\fR()
  57. function shall fail if:
  58. .TP
  59. .BR EPERM
  60. The requesting process does not have permission to determine the
  61. scheduling policy of the specified process.
  62. .TP
  63. .BR ESRCH
  64. No process can be found corresponding to that specified by
  65. .IR pid .
  66. .LP
  67. .IR "The following sections are informative."
  68. .SH EXAMPLES
  69. None.
  70. .SH "APPLICATION USAGE"
  71. None.
  72. .SH RATIONALE
  73. None.
  74. .SH "FUTURE DIRECTIONS"
  75. None.
  76. .SH "SEE ALSO"
  77. .IR "\fIsched_getparam\fR\^(\|)",
  78. .IR "\fIsched_setparam\fR\^(\|)",
  79. .IR "\fIsched_setscheduler\fR\^(\|)"
  80. .P
  81. The Base Definitions volume of POSIX.1\(hy2017,
  82. .IR "\fB<sched.h>\fP"
  83. .\"
  84. .SH COPYRIGHT
  85. Portions of this text are reprinted and reproduced in electronic form
  86. from IEEE Std 1003.1-2017, Standard for Information Technology
  87. -- Portable Operating System Interface (POSIX), The Open Group Base
  88. Specifications Issue 7, 2018 Edition,
  89. Copyright (C) 2018 by the Institute of
  90. Electrical and Electronics Engineers, Inc and The Open Group.
  91. In the event of any discrepancy between this version and the original IEEE and
  92. The Open Group Standard, the original IEEE and The Open Group Standard
  93. is the referee document. The original Standard can be obtained online at
  94. http://www.opengroup.org/unix/online.html .
  95. .PP
  96. Any typographical or formatting errors that appear
  97. in this page are most likely
  98. to have been introduced during the conversion of the source files to
  99. man page format. To report such errors, see
  100. https://www.kernel.org/doc/man-pages/reporting_bugs.html .