.\" t .\" Copyright (c) 2010 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-04-30, Akihiro MOTOKI .\" Updated 2012-05-02, Akihiro MOTOKI .\" .TH AIO_INIT 3 2012\-04\-26 Linux "Linux Programmer's Manual" .SH 名前 aio_init \- 非同期 I/O の初期化 .SH 書式 .nf \fB#define _GNU_SOURCE\fP /* See feature_test_macros(7) */ \fB#include \fP \fBvoid aio_init(const struct aioinit *\fP\fIinit\fP\fB);\fP .fi .sp \fI\-lrt\fP でリンクする。 .SH 説明 GNU 固有の \fBaio_init\fP() 関数を使うと、呼び出し側が glibc の POSIX AIO 実装に 対して調整 (チューニング) のヒントを与えることができる。この関数は使用しなく てもよいが、この関数が効果を持つには、POSIX AIO API の他の関数を利用する前に 呼び出さなければならない。 チューニングの情報は、引き数 \fIinit\fP が指すバッファーで与える。 このバッファーは以下の形式の構造体である。 .PP .in +4n .nf struct aioinit { int aio_threads; /* Maximum number of threads */ int aio_num; /* Number of expected simultaneous requests */ int aio_locks; /* Not used */ int aio_usedba; /* Not used */ int aio_debug; /* Not used */ int aio_numusers; /* Not used */ int aio_idle_time; /* Number of seconds before idle thread terminates (since glibc 2.2) */ int aio_reserved; }; .fi .in .PP \fIaioinit\fP 構造体のフィールドのうち以下が使用される。 .TP 15 \fIaio_threads\fP このフィールドは、AIO の実装が使用できるワーカースレッド数の最大値を指定する。 完了していない I/O 操作の数がこの上限を超えた場合、超過した操作は 空いたワーカースレッドができるまでキューに入る。 このフィールドに 1 未満の値を指定した場合には、値 1 が使用される。 デフォルト値は 20 である。 .TP \fIaio_num\fP .\" FIXME . But, if aio_num > 32, the behavior looks strange. See .\" http://sourceware.org/bugzilla/show_bug.cgi?id=12083 このフィールドは、呼び出し側がキューに入れる予定の 同時 I/O リクエスト数の最大値を指定する。 このフィールドに 32 未満の値が指定された場合、値は 32 に切り上げられる。 デフォルト値は 64 である。 .TP \fIaio_idle_time\fP このフィールドは、あるワーカースレッドが、前のリクエストの処理を完了してから、 次のリクエストをどのくらい時間待つかを秒単位で指定する。 指定した時間を経過しても次のリクエストがなければ、 そのワーカースレッドは終了される。デフォルト値は 1 秒である。 .SH バージョン The \fBaio_init\fP() 関数は glibc 2.1 以降で利用できる。 .SH 準拠 この関数は GNU による拡張である。 .SH 関連項目 \fBaio\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。