OSDN Git Service

Update drafts for LDP 3.67
[linuxjm/LDP_man-pages.git] / draft / man2 / sched_setparam.2
1 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
25 .\"            First version written
26 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
27 .\"            revision
28 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .\"
36 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
37 .\"         all rights reserved.
38 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
39 .\" Updated & Modified 2005-02-10, Yuichi SATO <ysato444@yahoo.co.jp>
40 .\" Updated & Modified 2005-10-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
41 .\" Updated 2006-04-14, Akihiro MOTOKI, LDP v2.29
42 .\"
43 .TH SCHED_SETPARAM 2 2014\-05\-11 Linux "Linux Programmer's Manual"
44 .SH 名前
45 sched_setparam, sched_getparam \- スケジューリングパラメータの設定と取得を行なう
46 .SH 書式
47 .nf
48 \fB#include <sched.h>\fP
49 .sp
50 \fBint sched_setparam(pid_t \fP\fIpid\fP\fB, const struct sched_param *\fP\fIparam\fP\fB);\fP
51 .sp
52 \fBint sched_getparam(pid_t \fP\fIpid\fP\fB, struct sched_param *\fP\fIparam\fP\fB);\fP
53 .sp
54 \fBstruct sched_param {
55     ...
56     int \fP\fIsched_priority\fP\fB;
57     ...
58 };\fP
59 .fi
60 .SH 説明
61 \fBsched_setparam\fP()  は \fIpid\fP で指定されたプロセスのスケジューリング方針 (scheduling policy) に
62 関連するスケジューリングパラメータを設定する。 \fIpid\fP が 0 ならば、呼び出し元のプロセスのパラメータが設定される。 引き数 \fIparam\fP
63 の解釈は、 \fIpid\fP で指定されたプロセスのスケジューリング方針によって異なる。 Linux でサポートされているスケジューリング方針の説明は
64 \fBsched\fP(7)  を参照のこと。
65
66 \fBsched_getparam\fP()  は \fIpid\fP で指定されたプロセスのスケジューリングパラメータを取得する。 \fIpid\fP が 0
67 ならば、呼び出し元のプロセスのパラメータを取得する。
68
69 \fBsched_setparam\fP()  はスレッドのスケジューリング方針における \fIparam\fP の妥当性をチェックする。
70 \fIparam\->sched_priority\fP の値は \fBsched_get_priority_min\fP(2)  と
71 \fBsched_get_priority_max\fP(2)  の範囲に入っていなければならない。
72
73 スケジューリングの優先度と方針に関連する特権とリソース制限の 議論に関しては \fBsched\fP(7)  を参照のこと。
74
75 \fBsched_setparam\fP()  と \fBsched_getparam\fP()  が使用できる POSIX システムでは、
76 \fI<unistd.h>\fP に \fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている。
77 .SH 返り値
78 成功した場合は \fBsched_setparam\fP()  と \fBsched_getparam\fP()  は 0 を返す。 エラーの場合は \-1
79 が返され、 \fIerrno\fP が適切に設定される。
80 .SH エラー
81 .TP 
82 \fBEINVAL\fP
83 無効な引き数: \fIparam\fP が NULL である、または \fIpid\fP が負である。
84 .TP 
85 \fBEINVAL\fP
86 (\fBsched_setparam\fP()) 引き数 \fIparam\fP が現在のスケジューリング方針においては 無意味である。
87 .TP 
88 \fBEPERM\fP
89 (\fBsched_setparam\fP()) 呼び出し元のプロセスが適切な特権を持っていない (Linux では、 \fBCAP_SYS_NICE\fP
90 ケーパビリティを持っていない)。
91 .TP 
92 \fBESRCH\fP
93 プロセス ID \fIpid\fP のプロセスが見つからなかった。
94 .SH 準拠
95 POSIX.1\-2001.
96 .SH 注意
97 .PP
98 Linux では、スケジューリングパラメータは実際にはスレッド単位の属性である。 \fBsched\fP(7) 参照。
99 .SH 関連項目
100 .ad l
101 .nh
102 \fBgetpriority\fP(2), \fBnice\fP(2), \fBsched_get_priority_max\fP(2),
103 \fBsched_get_priority_min\fP(2), \fBsched_getaffinity\fP(2),
104 \fBsched_getscheduler\fP(2), \fBsched_setaffinity\fP(2), \fBsched_setscheduler\fP(2),
105 \fBsched_setattr\fP(2), \fBsetpriority\fP(2), \fBcapabilities\fP(7), \fBsched\fP(7)
106 .SH この文書について
107 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
108 である。プロジェクトの説明とバグ報告に関する情報は
109 http://www.kernel.org/doc/man\-pages/ に書かれている。