186d7f5d3SJohn Marino.\" $FreeBSD: src/lib/libc/sys/sched_get_priority_max.2,v 1.3.2.9 2001/12/14 18:34:01 ru Exp $ 286d7f5d3SJohn Marino.\" $DragonFly: src/lib/libc/sys/sched_get_priority_max.2,v 1.5 2008/05/25 18:11:47 swildner Exp $ 386d7f5d3SJohn Marino.\" Copyright (c) 1998 HD Associates, Inc. 486d7f5d3SJohn Marino.\" All rights reserved. 586d7f5d3SJohn Marino.\" 686d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without 786d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions 886d7f5d3SJohn Marino.\" are met: 986d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 1086d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer. 1186d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 1286d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 1386d7f5d3SJohn Marino.\" documentation and/or other materials provided with the distribution. 1486d7f5d3SJohn Marino.\" 1586d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1686d7f5d3SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1786d7f5d3SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1886d7f5d3SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1986d7f5d3SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2086d7f5d3SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2186d7f5d3SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2286d7f5d3SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2386d7f5d3SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2486d7f5d3SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2586d7f5d3SJohn Marino.\" SUCH DAMAGE. 2686d7f5d3SJohn Marino.\" 2786d7f5d3SJohn Marino.Dd March 12, 1998 2886d7f5d3SJohn Marino.Dt SCHED_GET_PRIORITY_MAX 2 2986d7f5d3SJohn Marino.Os 3086d7f5d3SJohn Marino.Sh NAME 3186d7f5d3SJohn Marino.Nm sched_get_priority_max , 3286d7f5d3SJohn Marino.Nm sched_get_priority_min , 3386d7f5d3SJohn Marino.Nm sched_rr_get_interval 3486d7f5d3SJohn Marino.Nd get scheduling parameter limits 3586d7f5d3SJohn Marino.Sh LIBRARY 3686d7f5d3SJohn Marino.Lb libc 3786d7f5d3SJohn Marino.Sh SYNOPSIS 3886d7f5d3SJohn Marino.In sched.h 3986d7f5d3SJohn Marino.Ft int 4086d7f5d3SJohn Marino.Fn sched_get_priority_max "int policy" 4186d7f5d3SJohn Marino.Ft int 4286d7f5d3SJohn Marino.Fn sched_get_priority_min "int policy" 4386d7f5d3SJohn Marino.Ft int 4486d7f5d3SJohn Marino.Fn sched_rr_get_interval "pid_t pid" "struct timespec *interval" 4586d7f5d3SJohn Marino.Sh DESCRIPTION 4686d7f5d3SJohn MarinoThe 4786d7f5d3SJohn Marino.Fn sched_get_priority_max 4886d7f5d3SJohn Marinoand 4986d7f5d3SJohn Marino.Fn sched_get_priority_min 5086d7f5d3SJohn Marinofunctions return the appropriate maximum or minimum, respectively, 5186d7f5d3SJohn Marinofor the scheduling policy specified by 5286d7f5d3SJohn Marino.Fa policy . 5386d7f5d3SJohn MarinoThe 5486d7f5d3SJohn Marino.Fn sched_rr_get_interval 5586d7f5d3SJohn Marinofunction updates the 5686d7f5d3SJohn Marino.Fa timespec 5786d7f5d3SJohn Marinostructure referenced by the 5886d7f5d3SJohn Marino.Fa interval 5986d7f5d3SJohn Marinoargument to contain the current execution time limit (i.e., time 6086d7f5d3SJohn Marinoquantum) for the process specified by 6186d7f5d3SJohn Marino.Fa pid . 6286d7f5d3SJohn MarinoIf 6386d7f5d3SJohn Marino.Fa pid 6486d7f5d3SJohn Marinois zero, the current execution time limit for the calling process is 6586d7f5d3SJohn Marinoreturned. 6686d7f5d3SJohn Marino.Pp 6786d7f5d3SJohn MarinoThe value of 6886d7f5d3SJohn Marino.Fa policy 6986d7f5d3SJohn Marinoshould be one of the scheduling policy values defined in 7086d7f5d3SJohn Marino.In sched.h : 7186d7f5d3SJohn Marino.Bl -tag -width ".Dv SCHED_OTHER" 7286d7f5d3SJohn Marino.It Dv SCHED_FIFO 7386d7f5d3SJohn MarinoFirst-in-first-out fixed priority scheduling with no round robin scheduling; 7486d7f5d3SJohn Marino.It Dv SCHED_OTHER 7586d7f5d3SJohn MarinoThe standard time sharing scheduler; 7686d7f5d3SJohn Marino.It Dv SCHED_RR 7786d7f5d3SJohn MarinoRound-robin scheduling across same priority processes. 7886d7f5d3SJohn Marino.El 7986d7f5d3SJohn Marino.Sh RETURN VALUES 8086d7f5d3SJohn MarinoIf successful, the 8186d7f5d3SJohn Marino.Fn sched_get_priority_max 8286d7f5d3SJohn Marinoand 8386d7f5d3SJohn Marino.Fn sched_get_priority_min 8486d7f5d3SJohn Marinofunctions shall return the appropriate maximum or minimum values, 8586d7f5d3SJohn Marinorespectively. If unsuccessful, they shall return a value of -1 and set 8686d7f5d3SJohn Marino.Va errno 8786d7f5d3SJohn Marinoto indicate the error. 8886d7f5d3SJohn Marino.Pp 8986d7f5d3SJohn Marino.Rv -std sched_rr_get_interval 9086d7f5d3SJohn Marino.Sh ERRORS 9186d7f5d3SJohn MarinoOn failure 9286d7f5d3SJohn Marino.Va errno 9386d7f5d3SJohn Marinowill be set to the corresponding value: 9486d7f5d3SJohn Marino.Bl -tag -width Er 9586d7f5d3SJohn Marino.It Bq Er EINVAL 9686d7f5d3SJohn MarinoThe value of the 9786d7f5d3SJohn Marino.Fa policy 9886d7f5d3SJohn Marinoparameter does not represent a defined scheduling policy. 9986d7f5d3SJohn Marino.It Bq Er ENOSYS 10086d7f5d3SJohn MarinoThe 10186d7f5d3SJohn Marino.Fn sched_get_priority_max , 10286d7f5d3SJohn Marino.Fn sched_get_priority_min , 10386d7f5d3SJohn Marinoand 10486d7f5d3SJohn Marino.Fn sched_rr_get_interval 10586d7f5d3SJohn Marinofunctions are not supported by the implementation. 10686d7f5d3SJohn Marino.It Bq Er ESRCH 10786d7f5d3SJohn MarinoNo process can be found corresponding to that specified by 10886d7f5d3SJohn Marino.Fa pid . 10986d7f5d3SJohn Marino.El 11086d7f5d3SJohn Marino.Sh SEE ALSO 11186d7f5d3SJohn Marino.Xr sched_getparam 2 , 11286d7f5d3SJohn Marino.Xr sched_getscheduler 2 , 11386d7f5d3SJohn Marino.Xr sched_setparam 2 , 11486d7f5d3SJohn Marino.Xr sched_setscheduler 2 11586d7f5d3SJohn Marino.Sh STANDARDS 11686d7f5d3SJohn MarinoThe 11786d7f5d3SJohn Marino.Fn sched_setscheduler 11886d7f5d3SJohn Marinoand 11986d7f5d3SJohn Marino.Fn sched_getscheduler 12086d7f5d3SJohn Marinofunctions conform to 12186d7f5d3SJohn Marino.St -p1003.1b-93 . 122