1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
24 .\" all rights reserved.
25 .\" Translated Mon Jul 5 00:46:45 JST 2004
26 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
28 .TH AIO_READ 3 2003-11-14 "" "Linux Programmer's Manual"
34 .BI "int aio_read(struct aiocb *" aiocbp );
39 関数は非同期の "n = read(fd, buf, count)" をリクエストする。
40 ここで fd, buf, count は、それぞれ
41 .IR aiocbp\->aio_fildes ,
42 .IR aiocbp\->aio_buf ,
43 .I aiocbp\->aio_nbytes
45 返り値 (return status) n は、完了時に
49 データは、カレントのファイル位置に関係なく、絶対ファイルオフセット
50 .I aiocbp\->aio_offset
52 このリクエスト後の、カレントのファイル位置は規定されていない。
54 「非同期」とは「リクエストがキューに入れられたら、この呼び出しはすぐに返る」
56 呼び出しから戻った時に、読み込みは完了しているかも知れないし、
61 .B _POSIX_PRIORITIZED_IO
65 .I aiocbp\->aio_reqprio
66 を引いた優先度で登録 (submit) される。
69 .I aiocbp\->aio_lio_opcode
72 最大オフセットを超えた通常のファイルからは、何もデータが読み込まれない。
75 エラーの場合、リクエストはキューに入れられず、
96 は読み込みのためにオープンされた有効なファイルディスクリプタでない。
109 ファイルの終端の前から読み込みを開始して、
110 少なくとも 1 バイトを読み込もうとした。
111 しかし開始位置がこのファイルの最大オフセットを超えていた。
115 使用する前に制御ブロックを 0 にしておくのは、よい考えである。
116 この制御ブロックは、読み込み操作が進行している間は変更すべきでない。
121 これに含まれるメモリ領域は、有効なままにしなければならない。