.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" 1996-04-01 Tom Bjorkholm .\" First version written .\" 1996-04-10 Markus Kuhn .\" revision .\" Modified 2004-05-27 by Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SCHED_SETPARAM 2 2006\-03\-23 Linux "Linux Programmer's Manual" .SH 名前 sched_setparam, sched_getparam \- スケジューリング・パラメータの設定と取得を行なう .SH 書式 .nf \fB#include \fP .sp \fBint sched_setparam(pid_t \fP\fIpid\fP\fB, const struct sched_param *\fP\fIparam\fP\fB);\fP .sp \fBint sched_getparam(pid_t \fP\fIpid\fP\fB, struct sched_param *\fP\fIparam\fP\fB);\fP .sp \fBstruct sched_param { ... int \fP\fIsched_priority\fP\fB; ... };\fP .fi .SH 説明 \fBsched_setparam\fP() は \fIpid\fP で指定されたプロセスのスケジューリング方針 (scheduling policy) に 関連するスケジューリング・パラメータを設定する。 \fIpid\fP が 0 ならば、呼び出し元のプロセスのパラメータが設定される。 引き数 \fIparam\fP の解釈は、 \fIpid\fP で指定されたプロセスのスケジューリング方針によって異なる。 Linux でサポートされているスケジューリング方針の説明は \fBsched_setscheduler\fP(2) を参照のこと。 \fBsched_getparam\fP() は \fIpid\fP で指定されたプロセスのスケジューリング・パラメータを取得する。 \fIpid\fP が 0 ならば、呼び出し元のプロセスのパラメータを取得する。 \fBsched_setparam\fP() はプロセスのスケジューリング方針における \fIparam\fP の妥当性をチェックする。 \fIparam\->sched_priority\fP の値は \fBsched_get_priority_min\fP(2) と \fBsched_get_priority_max\fP(2) の範囲に入っていなければならない。 スケジューリングの優先度と方針に関連する特権とリソース制限の 議論に関しては \fBsched_setscheduler\fP(2) を参照のこと。 \fBsched_setparam\fP() と \fBsched_getparam\fP() が使用できる POSIX システムでは、 \fI\fP に \fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている。 .SH 返り値 成功した場合は \fBsched_setparam\fP() と \fBsched_getparam\fP() は 0 を返す。 エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEINVAL\fP 引き数 \fIparam\fP が現在のスケジューリング方針においては 無意味である。 .TP \fBEPERM\fP 呼び出し元のプロセスが適切な特権を持っていない (Linux では、 \fBCAP_SYS_NICE\fP ケーパビリティを持っていない)。 .TP \fBESRCH\fP プロセス ID \fIpid\fP のプロセスが見つからなかった。 .SH 準拠 POSIX.1\-2001. .SH 関連項目 \fBgetpriority\fP(2), \fBnice\fP(2), \fBsched_get_priority_max\fP(2), \fBsched_get_priority_min\fP(2), \fBsched_getaffinity\fP(2), \fBsched_getscheduler\fP(2), \fBsched_setaffinity\fP(2), \fBsched_setscheduler\fP(2), \fBsetpriority\fP(2), \fBcapabilities\fP(7) .PP \fIProgramming for the real world \- POSIX.4\fP by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1\-56592\-074\-0 .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。