I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
120 lines
3.7 KiB
Groff
120 lines
3.7 KiB
Groff
.\" 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: src/lib/libc/sys/sched_get_priority_max.2,v 1.19 2004/07/02 23:52:13 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd March 12, 1998
|
|
.Dt SCHED_GET_PRIORITY_MAX 2
|
|
.Os
|
|
.Sh 名称
|
|
.Nm sched_get_priority_max ,
|
|
.Nm sched_get_priority_min ,
|
|
.Nm sched_rr_get_interval
|
|
.Nd スケジュールパラメータの上限 / 下限を取得する
|
|
.Sh ライブラリ
|
|
.Lb libc
|
|
.Sh 書式
|
|
.In 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
|
|
.Rv -std sched_rr_get_interval
|
|
.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_getparam 2 ,
|
|
.Xr sched_getscheduler 2 ,
|
|
.Xr sched_setparam 2 ,
|
|
.Xr sched_setscheduler 2
|
|
.Sh 規格
|
|
.Fn sched_get_priority_max
|
|
システムコール、
|
|
.Fn sched_get_priority_min
|
|
システムコール、それから
|
|
.Fn sched_rr_get_interval
|
|
システムコールは
|
|
.St -p1003.1b-93
|
|
に適合しています。
|