aio_cancelのヘルプ・マニュアル
日本語 英語
aio_cancel --help
man aio_cancel
AIO_CANCEL(3) Linux Programmer’s Manual AIO_CANCEL(3)
名前
aio_cancel - 完了していない非同期 I/O リクエストをキャンセルする
書式
#include
int aio_cancel(int fd, struct aiocb *aiocbp);
-lrt でリンクする。
説明
aio_cancel() 関数は、ファイルディスクリプタ fd についての完了していない
非同期 I/O リクエストをキャンセルしようとする。 aiocbp が NULL の場合、
そ のような全てのリクエストがキャンセルされる。 aiocbp が NULL でない場
合、 aiocbp で指された制御ブロックで記述されたリクエストのみがキャン セ
ルされる。
キ ャンセルされたリクエストに対して、通常の非同期通知が起こる。リクエス
トの返り値は -1 に設定され、リクエストのエラー状態は ECANCELED に設定さ
れる。キャンセルできなかったリクエストの制御ブロックは変更されない。
aiocbp が NULL でなく、かつ fd が非同期操作が開始されたファイルディスク
リプタと異なる場合、生じる結果は不定である。
どの操作をキャンセルできるかは、実装定義である。
返り値
全てのリクエストのキャンセルが成功した場合、この関数は AIO_CANCELED を
返す。指定されたリクエストのうち少なくとも 1 つが進行中であるためにキャ
ンセルできなかった場合は、 AIO_NOTCANCELED が返される。この 場 合 は 、
aio_error(3) を使って個々のリクエストの状態をチェックすることができる。
呼び出される前に全てのリクエストが完了していた場合、この関数は AIO_ALL-
DONE を返す。何らかのエラーが起こった場合は、-1 が返されて、 errno が適
切に設定される。
エラー
EBADF fd が有効なファイルディスクリプタでない。
準拠
POSIX.1-2001.
関連項目
aio_error(3), aio_fsync(3), aio_read(3), aio_return(3), aio_suspend(3),
aio_write(3)
2003-11-14 AIO_CANCEL(3)
AIO_CANCEL(3) Linux Programmer’s Manual AIO_CANCEL(3)
NAME
aio_cancel - cancel an outstanding asynchronous I/O request
SYNOPSIS
#include
int aio_cancel(int fd, struct aiocb *aiocbp);
Link with -lrt.
DESCRIPTION
The aio_cancel() function attempts to cancel outstanding asynchronous
I/O requests for the file descriptor fd. If aiocbp is NULL, all such
requests are canceled. Otherwise, only the request described by the
control block pointed to by aiocbp is canceled.
Normal asynchronous notification occurs for canceled requests. The
request return status is set to -1, and the request error status is set
to ECANCELED. The control block of requests that cannot be canceled is
not changed.
If aiocbp is not NULL, and fd differs from the file descriptor with
which the asynchronous operation was initiated, unspecified results
occur.
Which operations are cancellable is implementation-defined.
RETURN VALUE
This function returns AIO_CANCELED if all requests were successfully
canceled. It returns AIO_NOTCANCELED when at least one of the requests
specified was not canceled because it was in progress. In this case
one may check the status of individual requests using aio_error(3).
This function returns AIO_ALLDONE when all requests had been completed
already before this call. When some error occurs, -1 is returned, and
errno is set appropriately.
ERRORS
EBADF fd is not a valid file descriptor.
CONFORMING TO
POSIX.1-2001.
SEE ALSO
aio_error(3), aio_fsync(3), aio_read(3), aio_return(3), aio_suspend(3),
aio_write(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2003-11-14 AIO_CANCEL(3)