1 .\" $FreeBSD: src/lib/libc/sys/sched_get_priority_max.2,v 1.3.2.9 2001/12/14 18:34:01 ru Exp $
2 .\" Copyright (c) 1998 HD Associates, Inc.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .Dt SCHED_GET_PRIORITY_MAX 2
30 .Nm sched_get_priority_max ,
31 .Nm sched_get_priority_min ,
32 .Nm sched_rr_get_interval
33 .Nd get scheduling parameter limits
39 .Fn sched_get_priority_max "int policy"
41 .Fn sched_get_priority_min "int policy"
43 .Fn sched_rr_get_interval "pid_t pid" "struct timespec *interval"
46 .Fn sched_get_priority_max
48 .Fn sched_get_priority_min
49 functions return the appropriate maximum or minimum, respectively,
50 for the scheduling policy specified by
53 .Fn sched_rr_get_interval
56 structure referenced by the
58 argument to contain the current execution time limit (i.e., time
59 quantum) for the process specified by
63 is zero, the current execution time limit for the calling process is
68 should be one of the scheduling policy values defined in
70 .Bl -tag -width [SCHED_OTHER]
72 First-in-first-out fixed priority scheduling with no round robin scheduling;
74 The standard time sharing scheduler;
76 Round-robin scheduling across same priority processes.
80 .Fn sched_get_priority_max
82 .Fn sched_get_priority_min
83 functions shall return the appropriate maximum or minimum values,
84 respectively. If unsuccessful, they shall return a value of -1 and set
86 to indicate the error.
88 .Rv -std sched_rr_get_interval
92 will be set to the corresponding value:
97 parameter does not represent a defined scheduling policy.
100 .Fn sched_get_priority_max ,
101 .Fn sched_get_priority_min ,
103 .Fn sched_rr_get_interval
104 functions are not supported by the implementation.
106 No process can be found corresponding to that specified by
110 .Xr sched_getparam 2 ,
111 .Xr sched_getscheduler 2 ,
112 .Xr sched_setparam 2 ,
113 .Xr sched_setscheduler 2
116 .Fn sched_setscheduler
118 .Fn sched_getscheduler