1 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
6 .\" First version written
7 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
10 .TH SCHED_GET_PRIORITY_MAX 2 2022-09-09 "Linux man-pages (unreleased)"
12 sched_get_priority_max, sched_get_priority_min \- get static priority range
15 .RI ( libc ", " \-lc )
20 .BI "int sched_get_priority_max(int " policy );
21 .BI "int sched_get_priority_min(int " policy );
24 .BR sched_get_priority_max ()
25 returns the maximum priority value that can be used with the
26 scheduling algorithm identified by
28 .BR sched_get_priority_min ()
29 returns the minimum priority value that can be used with the
30 scheduling algorithm identified by
42 Further details about these policies can be found in
45 Processes with numerically higher priority values are scheduled before
46 processes with numerically lower priority values.
49 .BR sched_get_priority_max ()
50 will be greater than the
52 .BR sched_get_priority_min ().
54 Linux allows the static priority range 1 to 99 for the
58 policies, and the priority 0 for the remaining policies.
59 Scheduling priority ranges for the various policies
62 The range of scheduling priorities may vary on other POSIX systems,
63 thus it is a good idea for portable applications to use a virtual
64 priority range and map it to the interval given by
65 .BR sched_get_priority_max ()
67 .BR sched_get_priority_min ()
69 .\" POSIX.1-2001, POSIX.1-2008 (XBD 2.8.4)
70 a spread of at least 32 between the maximum and the minimum values for
75 POSIX systems on which
76 .BR sched_get_priority_max ()
78 .BR sched_get_priority_min ()
80 .B _POSIX_PRIORITY_SCHEDULING
85 .BR sched_get_priority_max ()
87 .BR sched_get_priority_min ()
88 return the maximum/minimum priority value for the named scheduling
90 On error, \-1 is returned, and
92 is set to indicate the error.
98 does not identify a defined scheduling policy.
100 POSIX.1-2001, POSIX.1-2008.
104 .BR sched_getaffinity (2),
105 .BR sched_getparam (2),
106 .BR sched_getscheduler (2),
107 .BR sched_setaffinity (2),
108 .BR sched_setparam (2),
109 .BR sched_setscheduler (2),