1SCHED_GETPARAM(3P) POSIX Programmer's Manual SCHED_GETPARAM(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 sched_getparam — get scheduling parameters (REALTIME)
13
15 #include <sched.h>
16
17 int sched_getparam(pid_t pid, struct sched_param *param);
18
20 The sched_getparam() function shall return the scheduling parameters of
21 a process specified by pid in the sched_param structure pointed to by
22 param.
23
24 If a process specified by pid exists, and if the calling process has
25 permission, the scheduling parameters for the process whose process ID
26 is equal to pid shall be returned.
27
28 If pid is zero, the scheduling parameters for the calling process shall
29 be returned. The behavior of the sched_getparam() function is unspeci‐
30 fied if the value of pid is negative.
31
33 Upon successful completion, the sched_getparam() function shall return
34 zero. If the call to sched_getparam() is unsuccessful, the function
35 shall return a value of -1 and set errno to indicate the error.
36
38 The sched_getparam() function shall fail if:
39
40 EPERM The requesting process does not have permission to obtain the
41 scheduling parameters of the specified process.
42
43 ESRCH No process can be found corresponding to that specified by pid.
44
45 The following sections are informative.
46
48 None.
49
51 None.
52
54 None.
55
57 None.
58
60 sched_getscheduler(), sched_setparam(), sched_setscheduler()
61
62 The Base Definitions volume of POSIX.1‐2017, <sched.h>
63
65 Portions of this text are reprinted and reproduced in electronic form
66 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
67 table Operating System Interface (POSIX), The Open Group Base Specifi‐
68 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
69 Electrical and Electronics Engineers, Inc and The Open Group. In the
70 event of any discrepancy between this version and the original IEEE and
71 The Open Group Standard, the original IEEE and The Open Group Standard
72 is the referee document. The original Standard can be obtained online
73 at http://www.opengroup.org/unix/online.html .
74
75 Any typographical or formatting errors that appear in this page are
76 most likely to have been introduced during the conversion of the source
77 files to man page format. To report such errors, see https://www.ker‐
78 nel.org/doc/man-pages/reporting_bugs.html .
79
80
81
82IEEE/The Open Group 2017 SCHED_GETPARAM(3P)