OSDN Git Service

(split) LDP: drafts generated from latest pthread/ja.po.
[linuxjm/LDP_man-pages.git] / draft / man3 / pthread_attr_setinheritsched.3
1 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\"*******************************************************************
25 .\"
26 .\" This file was generated with po4a. Translate the source file.
27 .\"
28 .\"*******************************************************************
29 .TH PTHREAD_ATTR_SETINHERITSCHED 3 2012\-03\-15 Linux "Linux Programmer's Manual"
30 .SH 名前
31 pthread_attr_setinheritsched, pthread_attr_getinheritsched \-
32 スレッド属性オブジェクトの inherit scheduler 属性の設定/取得を行う
33 .SH 書式
34 .nf
35 \fB#include <pthread.h>\fP
36
37 \fBint pthread_attr_setinheritsched(pthread_attr_t *\fP\fIattr\fP\fB,\fP
38 \fB                                 int \fP\fIinheritsched\fP\fB);\fP
39 \fBint pthread_attr_getinheritsched(pthread_attr_t *\fP\fIattr\fP\fB,\fP
40 \fB                                 int *\fP\fIinheritsched\fP\fB);\fP
41 .sp
42 \fI\-pthread\fP でコンパイルしてリンクする。
43 .fi
44 .SH 説明
45 \fBpthread_attr_setinheritsched\fP() 関数は、
46 \fIattr\fP が参照するスレッド属性オブジェクトの inherit scheduler 属性を
47 \fIinheritsched\fP で指定された値に設定する。
48 inherit scheduler 属性により、スレッド属性オブジェクト \fIattr\fP を使って
49 作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承
50 するか、\fIattr\fP からスケジューリング属性を取得するかが決定される。
51
52 以下の値を \fIinheritsched\fP に指定できる。
53 .TP 
54 \fBPTHREAD_INHERIT_SCHED\fP
55 \fIattr\fP を使って作成されたスレッドは、
56 スレッドを作成するスレッドからスケジューリング属性を継承する。
57 \fIattr\fP 内のスケジューリング属性は無視される。
58 .TP 
59 \fBPTHREAD_EXPLICIT_SCHED\fP
60 .\" FIXME what are the defaults for scheduler settings?
61 \fIattr\fP を使って作成されたスレッドは、スレッド属性オブジェクトで
62 指定された値からスケジューリング属性を取得する。
63 .PP
64 新たに初期化されたスレッド属性オブジェクトの inherit scheduler 属性の
65 デフォルト設定は \fBPTHREAD_INHERIT_SCHED\fP である。
66
67 \fBpthread_attr_getinheritsched\fP() は、
68 スレッド属性オブジェクト \fIattr\fP の inherit scheduler 属性を
69 \fIinheritsched\fP が指すバッファに入れて返す。
70 .SH 返り値
71 成功すると、これらの関数は 0 を返す。
72 エラーの場合、0 以外のエラー番号を返す。
73 .SH エラー
74 \fBpthread_attr_setinheritsched\fP() は以下のエラーで失敗する場合がある。
75 .TP 
76 \fBEINVAL\fP
77 \fIinheritsched\fP に無効な値が指定された。
78 .PP
79 .\" .SH VERSIONS
80 .\" Available since glibc 2.0.
81 POSIX.1\-2001 では、 \fBpthread_attr_setinheritsched\fP() に関して
82 エラー \fBENOTSUP\fP ("サポートされていない値を属性に設定しようとした")
83 も追加で規定されている。
84 .SH 準拠
85 POSIX.1\-2001.
86 .SH バグ
87 .\" FIXME . Track status of the following bug:
88 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7007
89 glibc 2.8 の時点では、スレッド属性オブジェクトが
90 \fBpthread_attr_init\fP(3) を使って初期化された場合、
91 スレッド属性オブジェクトのスケジューリングポリシーが \fBSCHED_OTHER\fP に、
92 スケジューリング優先度が 0 に設定される。一方、その後 inherit
93 scheduling 属性に \fBPTHREAD_EXPLICIT_SCHED\fP が設定されると、このスレッ
94 ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するス
95 レッドのスケジューリング属性が間違って継承されてしまう。
96 \fBpthread_create\fP(3) を呼び出す前にスケジューリングポリシー属性か
97 スケジューリング優先度属性のどちらかが明示的に設定された場合には、
98 このバグは発生しない。
99 .SH 例
100 \fBpthread_setschedparam\fP(3) を参照。
101 .SH 関連項目
102 \fBsched_setscheduler\fP(2), \fBpthread_attr_init\fP(3),
103 \fBpthread_attr_setschedparam\fP(3), \fBpthread_attr_setschedpolicy\fP(3),
104 \fBpthread_create\fP(3), \fBpthread_setschedparam\fP(3),
105 \fBpthread_setschedprio\fP(3), \fBpthreads\fP(7)
106 .SH この文書について
107 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
108 である。プロジェクトの説明とバグ報告に関する情報は
109 http://www.kernel.org/doc/man\-pages/ に書かれている。