.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2012 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2012-05-04, Akihiro MOTOKI .\" .TH PTHREAD_SETSCHEDPRIO 3 2008\-11\-06 Linux "Linux Programmer's Manual" .SH 名前 pthread_setschedprio \- スレッドのスケジューリング優先度を設定する .SH 書式 .nf \fB#include \fP \fBpthread_setschedprio(pthread_t \fP\fIthread\fP\fB, int \fP\fIprio\fP\fB);\fP .sp \fI\-pthread\fP でコンパイルしてリンクする。 .fi .SH 説明 .\" FIXME . nptl/pthread_setschedprio.c has the following .\" /* If the thread should have higher priority because of some .\" PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ .\" Eventually (perhaps after writing the mutexattr pages), we .\" may want to add something on the topic to this page. .\" nptl/pthread_setschedparam.c has a similar case. \fBpthread_setschedprio\fP() 関数は、スレッド \fIthread\fP のスケジューリング 優先度に \fIprio\fP で指定された値を設定する (一方、\fBpthread_setschedparam\fP(3) はスレッドのスケジューリングポリシー と優先度の両方を変更する)。 .SH 返り値 成功すると、この関数は 0 を返す。 エラーの場合、0 以外のエラー番号を返す。 \fBpthread_setschedprio\fP() が失敗した場合、 \fIthread\fP の スケジューリング優先度は変更されない。 .SH エラー .TP \fBEINVAL\fP 指定されたスレッドのスケジューリングポリシーでは、 \fIprio\fP は無効である。 .TP \fBEPERM\fP 呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。 .TP \fBESRCH\fP ID が \fIthread\fP のスレッドが見つからなかった。 .PP POSIX.1\-2001 では、 \fBpthread_setschedprio\fP() に関して エラー \fBENOTSUP\fP ("サポートされていない値を優先度 に設定しようとした") も追加で規定されている。 .SH バージョン この関数は glibc バージョン 2.3.4 以降で利用できる。 .SH 準拠 POSIX.1\-2001. .SH 注意 スレッドのスケジューリング優先度を変更するために必要な許可や 変更した場合の影響、および各スケジューリングポリシーで認められる優先度 の範囲の詳細については、 \fBsched_setscheduler\fP(2) を参照。 .SH 関連項目 .ad l .nh \fBgetrlimit\fP(2), \fBsched_get_priority_min\fP(2), \fBsched_setscheduler\fP(2), \fBpthread_attr_init\fP(3), \fBpthread_attr_setinheritsched\fP(3), \fBpthread_attr_setschedparam\fP(3), \fBpthread_attr_setschedpolicy\fP(3), \fBpthread_create\fP(3), \fBpthread_self\fP(3), \fBpthread_setschedparam\fP(3), \fBpthreads\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。