.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) .\" and Copyright (C) 2010 Michael kerrisk .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, see .\" . .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2004 Yuichi SATO .\" all rights reserved. .\" Translated Sat Jul 10 03:18:23 JST 2004 .\" by Yuichi SATO .\" Updated 2012-04-30, Akihiro MOTOKI .\" Updated 2012-05-29, Akihiro MOTOKI .\" .TH AIO_SUSPEND 3 2012\-05\-08 "" "Linux Programmer's Manual" .SH 名前 aio_suspend \- 非同期 I/O 操作またはタイムアウトを待つ .SH 書式 .nf .sp \fB#include \fP .sp \fBint aio_suspend(const struct aiocb * const \fP\fIaiocb_list\fP\fB[],\fP .br \fB int \fP\fInitems\fP\fB, const struct timespec *\fP\fItimeout\fP\fB);\fP .sp \fI\-lrt\fP でリンクする。 .fi .SH 説明 \fBaio_suspend\fP() 関数は、以下のいずれかが発生するまで 呼び出したスレッドの実行を停止 (suspend) する。 .IP * 3 \fIaiocb_list\fP リスト内の非同期 I/O リクエストのうち、少なくとも一つが完了した。 .IP * シグナルが配送された。 .IP * \fItimeout\fP が NULL でない場合に、指定した時間が経過した (\fItimespec\fP 構造体の詳細は \fBnanosleep\fP(2) を参照)。 .LP \fInitems\fP 引き数は \fIaiocb_list\fP の要素数を指定する。 \fIaiocb_list\fP が指すリストの各要素は、NULL (これは無視される) か、 \fBaio_read\fP(3), \fBaio_write\fP(3), \fBlio_listio\fP(3) を使って I/O が開始された 制御ブロックへのポインタでなければならない。 (\fIaiocb\fP 構造体の説明は \fBaio\fP(7) を参照) .LP \fBCLOCK_MONOTONIC\fP がサポートされる場合、 このクロックを使ってタイムアウトの 間隔が計測される (\fBclock_gettime\fP(3) を参照)。 .SH 返り値 \fIaiocb_list\fP で指定された I/O リクエストの 1 つが完了した後に この関数が返った場合は、0 が返される。 それ以外の場合は、 \-1 が返り、 \fIerrno\fP にエラーを示す値に設定される。 .SH エラー .TP \fBEAGAIN\fP 指示された操作のどれも完了しないうちに、呼び出しがタイムアウトした。 .TP \fBEINTR\fP この呼び出しがシグナルによって終了させられた (このシグナルは、完了を待っていた 操作のいずれかの完了シグナルの可能性もある)。\fBsignal\fP(7) 参照。 .TP \fBENOSYS\fP \fBaio_suspend\fP() は実装されていない。 .SH バージョン The \fBaio_suspend\fP() 関数は glibc 2.1 以降で利用できる。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. .SH 注意 時間間隔が 0 であることを指定する NULL ではない \fItimeout\fP を使って、ポーリングを行うこともできる。 \fIaiocb_list\fP リストで指定した非同期 I/O 操作のうち、 \fBaio_suspend\fP() を呼び出した時点ですでに完了したものがある場合、 \fBaio_suspend\fP() はすぐに返る。 \fBaio_suspend\fP() が成功で返った後でどの I/O 操作が完了したかを特定するには、 \fBaio_error\fP(3) を使って \fIaiocb_list\fP が指す \fIaiocb\fP 構造体のリストを スキャンする。 .SH 関連項目 \fBaio_cancel\fP(3), \fBaio_error\fP(3), \fBaio_fsync\fP(3), \fBaio_read\fP(3), \fBaio_return\fP(3), \fBaio_write\fP(3), \fBlio_listio\fP(3), \fBaio\fP(7), \fBtime\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。