1.\" Copyright (c) 1998 HD Associates, Inc. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\"
|
25.\" $FreeBSD: head/lib/libc/sys/sched_get_priority_max.2 108087 2002-12-19 09:40:28Z ru $
|
25.\" $FreeBSD: head/lib/libc/sys/sched_get_priority_max.2 131504 2004-07-02 23:52:20Z ru $ |
26.\" 27.Dd March 12, 1998 28.Dt SCHED_GET_PRIORITY_MAX 2 29.Os 30.Sh NAME 31.Nm sched_get_priority_max , 32.Nm sched_get_priority_min , 33.Nm sched_rr_get_interval 34.Nd get scheduling parameter limits 35.Sh LIBRARY 36.Lb libc 37.Sh SYNOPSIS 38.In sched.h 39.Ft int 40.Fn sched_get_priority_max "int policy" 41.Ft int 42.Fn sched_get_priority_min "int policy" 43.Ft int 44.Fn sched_rr_get_interval "pid_t pid" "struct timespec *interval" 45.Sh DESCRIPTION 46The 47.Fn sched_get_priority_max 48and 49.Fn sched_get_priority_min 50system calls return the appropriate maximum or minimum, respectively, 51for the scheduling policy specified by 52.Fa policy . 53The 54.Fn sched_rr_get_interval 55system call updates the 56.Fa timespec 57structure referenced by the 58.Fa interval 59argument to contain the current execution time limit (i.e., time 60quantum) for the process specified by 61.Fa pid . 62If 63.Fa pid 64is zero, the current execution time limit for the calling process is 65returned. 66.Pp 67The value of 68.Fa policy 69should be one of the scheduling policy values defined in 70.Fa <sched.h> : 71.Bl -tag -width [SCHED_OTHER] 72.It Bq Er SCHED_FIFO 73First-in-first-out fixed priority scheduling with no round robin scheduling; 74.It Bq Er SCHED_OTHER 75The standard time sharing scheduler; 76.It Bq Er SCHED_RR 77Round-robin scheduling across same priority processes. 78.El 79.Sh RETURN VALUES 80If successful, the 81.Fn sched_get_priority_max 82and 83.Fn sched_get_priority_min 84system calls shall return the appropriate maximum or minimum values,
|
85respectively. If unsuccessful, they shall return a value of -1 and set
|
85respectively. 86If unsuccessful, they shall return a value of -1 and set |
87.Fa errno 88to indicate the error. 89.Pp 90.Rv -std sched_rr_get_interval 91.Sh ERRORS 92On failure 93.Va errno 94will be set to the corresponding value: 95.Bl -tag -width Er 96.It Bq Er EINVAL 97The value of the 98.Fa policy 99argument does not represent a defined scheduling policy. 100.It Bq Er ENOSYS 101The 102.Fn sched_get_priority_max , 103.Fn sched_get_priority_min , 104and 105.Fn sched_rr_get_interval 106system calls are not supported by the implementation. 107.It Bq Er ESRCH 108No process can be found corresponding to that specified by 109.Fa pid . 110.El 111.Sh SEE ALSO 112.Xr sched_getparam 2 , 113.Xr sched_getscheduler 2 , 114.Xr sched_setparam 2 , 115.Xr sched_setscheduler 2 116.Sh STANDARDS 117The 118.Fn sched_get_priority_max , 119.Fn sched_get_priority_min , 120and 121.Fn sched_rr_get_interval 122system calls conform to 123.St -p1003.1b-93 .
|