jpman project specific RCS keyword (jpman %Id) is obsolete, after manual entries are stored in freefall CVS repository. This old Id is useless and more worse it confuses users and bug reporters. So, this old Id is removed. Submitted by:jpman project <man-jp@jp.FreeBSD.org>
119 lines
3.6 KiB
Groff
119 lines
3.6 KiB
Groff
.\" %FreeBSD: src/lib/libc/sys/sched_get_priority_max.2,v 1.3.2.5 2000/12/12 09:55:46 ru Exp %
|
|
.\" Copyright (c) 1998 HD Associates, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd March 12, 1998
|
|
.Dt SCHED_GET_PRIORITY_MAX 2
|
|
.Os BSD 4
|
|
.Sh 名称
|
|
.Nm sched_get_priority_max ,
|
|
.Nm sched_get_priority_min ,
|
|
.Nm sched_rr_get_interval
|
|
.Nd スケジュールパラメータの上限 / 下限を取得する
|
|
.Sh ライブラリ
|
|
.Lb libc
|
|
.Sh 書式
|
|
.Fd #include <sched.h>
|
|
.Ft int
|
|
.Fn sched_get_priority_max "int policy"
|
|
.Ft int
|
|
.Fn sched_get_priority_min "int policy"
|
|
.Ft int
|
|
.Fn sched_rr_get_interval "pid_t pid" "struct timespec *interval"
|
|
.Sh 解説
|
|
.Fn sched_get_priority_max
|
|
関数と
|
|
.Fn sched_get_priority_min
|
|
関数は、
|
|
.Fa policy
|
|
で指定されたスケジューリング方針について、
|
|
それぞれ該当する最大と最小を返します。
|
|
.Fn sched_rr_get_interval
|
|
関数は、
|
|
.Fa interval
|
|
引数によって参照される
|
|
.Fa timespec
|
|
構造体を、
|
|
.Fa pid
|
|
で指定されるプロセスについて
|
|
現在の実行時間制限 (すなわち、時間量) が含まれるように更新します。
|
|
.Fa pid
|
|
が 0 の場合、呼び出し元プロセスに関する現在の実行時間制限が返されます。
|
|
.Pp
|
|
.Fa policy
|
|
の値は
|
|
.Fa <sched.h>
|
|
で定義されたスケジュール方針の 1 つにする必要があります。
|
|
.Bl -tag -width [SCHED_OTHER]
|
|
.It Bq Er SCHED_FIFO
|
|
ラウンドロビンスケジュールなしの先入先出 (FIFO) 固定優先順位スケジュール。
|
|
.It Bq Er SCHED_OTHER
|
|
標準のタイムシェアリングスケジューラ。
|
|
.It Bq Er SCHED_RR
|
|
同じ優先順位のプロセス間でのラウンドロビンスケジューリング。
|
|
.El
|
|
.Sh 戻り値
|
|
.Fn sched_get_priority_max
|
|
関数と
|
|
.Fn sched_get_priority_min
|
|
関数は、正常に完了するとそれぞれ該当する最大値または最小値を返します。
|
|
そうでない場合、どちらの関数も -1 が返され、エラーを示すために
|
|
.Fa errno
|
|
が設定されます。
|
|
.Pp
|
|
.Fn sched_rr_get_interval
|
|
関数は、正常に完了すると 0 を返します。そうでない場合、
|
|
値 -1 を返され、エラーを示すために
|
|
.Fa errno
|
|
が設定されます。
|
|
.Sh エラー
|
|
処理を失敗すると、
|
|
.Va errno
|
|
は対応する値に設定されます。
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
.Fa policy
|
|
パラメータの値が定義されているスケジュール方針ではありません。
|
|
.It Bq Er ENOSYS
|
|
.Fn sched_get_priority_max ,
|
|
.Fn sched_get_priority_min ,
|
|
.Fn sched_rr_get_interval
|
|
は、この実装ではサポートされていません。
|
|
.It Bq Er ESRCH
|
|
.Fa pid
|
|
で指定されるプロセスに対応するプロセスが見つかりません。
|
|
.El
|
|
.Sh 関連項目
|
|
.Xr sched_get_scheduler 2 ,
|
|
.Xr sched_getparam 2 ,
|
|
.Xr sched_set_scheduler 2 ,
|
|
.Xr sched_setparam 2
|
|
.Sh 規格
|
|
.Fn sched_setscheduler
|
|
関数と
|
|
.Fn sched_getscheduler
|
|
関数は
|
|
.St -p1003.1b-93
|
|
に準拠しています。
|