OSDN Git Service

(split) LDP: Update releases for LDP v3.40.
[linuxjm/LDP_man-pages.git] / release / man2 / sched_rr_get_interval.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
26 .\"            First version written
27 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
28 .\"            revision
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH SCHED_RR_GET_INTERVAL 2 2011\-10\-16 Linux "Linux Programmer's Manual"
36 .SH 名前
37 sched_rr_get_interval \- 指定されたプロセスの SCHED_RR 間隔を取得する
38 .SH 書式
39 \fB#include <sched.h>\fP
40 .sp
41 \fBint sched_rr_get_interval(pid_t \fP\fIpid\fP\fB, struct timespec *\fP\fItp\fP\fB);\fP
42 .SH 説明
43 \fBsched_rr_get_interval\fP() は \fItp\fP で指定された \fItimespec\fP 構造体に
44 \fIpid\fP で指定されたプロセスのラウンドロビン時間量 (round robin time
45 quantum) を書き込む。指定されたプロセスは \fBSCHED_RR\fP スケジューリング
46 ポリシーで動作しているはずである。
47
48 \fItimespec\fP 構造体は以下の通りである:
49
50 .in +4n
51 .nf
52 struct timespec {
53     time_t tv_sec;    /* seconds */
54     long   tv_nsec;   /* nanoseconds */
55 };
56 .fi
57 .in
58
59 .\" FIXME . On Linux, sched_rr_get_interval()
60 .\" returns the timeslice for SCHED_OTHER processes -- this timeslice
61 .\" is influenced by the nice value.
62 .\" For SCHED_FIFO processes, this always returns 0.
63 .\"
64 .\" The round-robin time quantum value is not alterable under Linux
65 .\" 1.3.81.
66 .\"
67 \fIpid\fP が 0 の場合、呼び出したプロセスの時間量 (time quantum) が
68 \fI*tp\fP に書き込まれる。
69 .SH 返り値
70 成功した場合は \fBsched_rr_get_interval\fP()  は 0 を返す。 エラーの場合は \-1 が返され、 \fIerrno\fP
71 が適切に設定される。
72 .SH エラー
73 .TP 
74 \fBEFAULT\fP
75 情報をユーザ空間にコピーする時に問題が起きた。
76 .TP 
77 \fBEINVAL\fP
78 PID が不正である。
79 .TP 
80 \fBENOSYS\fP
81 システム・コールがまだ実装されていない (かなり古いカーネルにおいてのみ)。
82 .TP 
83 \fBESRCH\fP
84 プロセス ID が \fIpid\fP のプロセスが見つからなかった。
85 .SH 準拠
86 POSIX.1\-2001.
87 .SH 注意
88 POSIX システムで \fBsched_rr_get_interval\fP() は \fI<unistd.h>\fP に
89 \fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている場合にのみ使用可能である。
90 .SS "Linux での注意"
91 .\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
92 .\" .SH BUGS
93 .\" As of Linux 1.3.81
94 .\" .BR sched_rr_get_interval ()
95 .\" returns with error
96 .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
97 .\" properly.
98 POSIX ではラウンドロビン時間量の大きさを制御する仕組みが規定されていな
99 い。古い Linux カーネルではこれを変更する方法が提供されている (この方法
100 に移植性はない)。プロセスの nice 値を調整することで時間量を制御できる
101 (\fBsetpriority\fP(2) 参照)。 負の nice 値 (すなわち、高い nice 値) を割り
102 当てると時間量は長くなり、 正の nice 値 (すなわち、低い nice 値) を割り
103 当てると時間量は短くなる。 デフォルトの時間量は 0.1 秒である。 nice 値
104 の変更が時間量にどの程度影響を与えるかは カーネルのバージョンにより多少
105 異なる。
106 .SH 関連項目
107 \fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明
108 がある。
109 .PP
110 \fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly
111 & Associates, Inc., ISBN 1\-56592\-074\-0
112 .SH この文書について
113 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
114 である。プロジェクトの説明とバグ報告に関する情報は
115 http://www.kernel.org/doc/man\-pages/ に書かれている。