.\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996 .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" 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, see .\" . .\" %%%LICENSE_END .\" .\" 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. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated 1997-02-23, HANATAKA Shinya .\" Updated & Modified 2005-02-10, Yuichi SATO .\" Updated & Modified 2005-10-10, Akihiro MOTOKI .\" Updated 2006-04-14, Akihiro MOTOKI, LDP v2.29 .\" .TH SCHED_SETPARAM 2 " 2019\-10\-10" Linux "Linux Programmer's Manual" .SH 名前 sched_setparam, sched_getparam \- スケジューリングパラメーターの設定と取得を行なう .SH 書式 .nf \fB#include \fP .PP \fBint sched_setparam(pid_t \fP\fIpid\fP\fB, const struct sched_param *\fP\fIparam\fP\fB);\fP .PP \fBint sched_getparam(pid_t \fP\fIpid\fP\fB, struct sched_param *\fP\fIparam\fP\fB);\fP .PP \fBstruct sched_param { ... int \fP\fIsched_priority\fP\fB; ... };\fP .fi .SH 説明 \fBsched_setparam\fP() sets the scheduling parameters associated with the scheduling policy for the thread whose thread ID is specified in \fIpid\fP. If \fIpid\fP is zero, then the parameters of the calling thread are set. The interpretation of the argument \fIparam\fP depends on the scheduling policy of the thread identified by \fIpid\fP. See \fBsched\fP(7) for a description of the scheduling policies supported under Linux. .PP \fBsched_getparam\fP() は \fIpid\fP で指定されたスレッドのスケジューリングパラメーターを取得する。 \fIpid\fP が 0 ならば、呼び出し元のスレッドのパラメーターを取得する。 .PP \fBsched_setparam\fP() はスレッドのスケジューリング方針における \fIparam\fP の妥当性をチェックする。 \fIparam\->sched_priority\fP の値は \fBsched_get_priority_min\fP(2) と \fBsched_get_priority_max\fP(2) の範囲に入っていなければならない。 .PP スケジューリングの優先度と方針に関連する特権とリソース制限の 議論に関しては \fBsched\fP(7) を参照のこと。 .PP \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 が NULL である、または \fIpid\fP が負である。 .TP \fBEINVAL\fP (\fBsched_setparam\fP()) 引数 \fIparam\fP が現在のスケジューリング方針においては 無意味である。 .TP \fBEPERM\fP (\fBsched_setparam\fP()) 呼び出し元が適切な特権を持っていない (Linux では、 \fBCAP_SYS_NICE\fP ケーパビリティを持っていない)。 .TP \fBESRCH\fP ID が \fIpid\fP のスレッドが見つからなかった。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. .SH 関連項目 .ad l .nh \fBgetpriority\fP(2), \fBgettid\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_setattr\fP(2), \fBsched_setscheduler\fP(2), \fBsetpriority\fP(2), \fBcapabilities\fP(7), \fBsched\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。