OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / aio_init.3
1 .\" t
2 .\" Copyright (c) 2010 by Michael Kerrisk <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 AIO_INIT 3 2010\-10\-06 Linux "Linux Programmer's Manual"
30 .SH 名前
31 aio_init \- POSIX 非同期 I/O の初期化
32 .SH 書式
33 .nf
34 \fB#define _GNU_SOURCE\fP         /* See feature_test_macros(7) */
35 \fB#include <aio.h>\fP
36
37 \fBvoid aio_init(const struct aioinit *\fP\fIinit\fP\fB);\fP
38 .fi
39 .sp
40 \fI\-lrt\fP でリンクする。
41 .SH 説明
42 GNU 固有の \fBaio_init\fP() 関数を使うと、呼び出し側が glibc の POSIX AIO 実装に
43 対して調整 (チューニング) のヒントを与えることができる。この関数は使用しなく
44 てもよいが、この関数が効果を持つには、POSIX AIO API の他の関数を利用する前に
45 呼び出さなければならない。
46
47 チューニングの情報は、引き数 \fIinit\fP が指すバッファで与える。
48 このバッファは以下の形式の構造体である。
49 .PP
50 .in +4n
51 .nf
52 struct aioinit {
53     int aio_threads;    /* Maximum number of threads */
54     int aio_num;        /* Number of expected simultaneous
55                            requests */
56     int aio_locks;      /* Not used */
57     int aio_usedba;     /* Not used */
58     int aio_debug;      /* Not used */
59     int aio_numusers;   /* Not used */
60     int aio_idle_time;  /* Number of seconds before idle thread
61                            terminates (since glibc 2.2) */
62     int aio_reserved;
63 };
64 .fi
65 .in
66 .PP
67 \fIaioinit\fP 構造体のフィールドのうち以下が使用される。
68 .TP  15
69 \fIaio_threads\fP
70 このフィールドは、AIO の実装が使用できるワーカースレッド数の最大値を指定する。
71 完了していない I/O 操作の数がこの上限を超えた場合、超過した操作は
72 空いたワーカースレッドができるまでキューに入る。
73 このフィールドに 1 未満の値を指定した場合には、値 1 が使用される。
74 デフォルト値は 20 である。
75 .TP 
76 \fIaio_num\fP
77 .\" FIXME But, if aio_num > 32, the behavior looks strange. See
78 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=12083
79 このフィールドは、呼び出し側がキューに入れる予定の
80 同時 I/O リクエスト数の最大値を指定する。
81 このフィールドに 32 未満の値が指定された場合、値は 32 に切り上げられる。
82 デフォルト値は 64 である。
83 .TP 
84 \fIaio_idle_time\fP
85 このフィールドは、あるワーカースレッドが、前のリクエストの処理を完了してから、
86 次のリクエストをどのくらい時間待つかを秒単位で指定する。
87 指定した時間を経過しても次のリクエストがなければ、
88 そのワーカースレッドは終了される。デフォルト値は 1 秒である。
89 .SH バージョン
90 The \fBaio_init\fP() 関数は glibc 2.1 以降で利用できる。
91 .SH 準拠
92 この関数は GNU による拡張である。
93 .SH 関連項目
94 \fBaio\fP(7)