io_cancelのヘルプ・マニュアル
日本語 英語
io_cancel --help
man io_cancel
IO_CANCEL(2) Linux Programmer’s Manual IO_CANCEL(2)
名前
io_cancel - 未処理の非同期 I/O 操作の取り消し
書式
#include
int io_cancel(aio_context_t ctx_id, struct iocb *iocb,
struct io_event *result);
-laio とリンクする。
説明
io_cancel() は、過去に io_submit(2) を使って登録された非同期 I/O (AIO)
操作の取り消しを行おうとする。 ctx_id は、取り消しを行う操作の AIO コン
テキストの ID である。指定した AIO コンテキストが見つかると、対象のイベ
ントの取り消しが行われ、その後 result で指されたメモリにコピーされる (
このとき、完了キューへの移動は行われない)。
返り値
成 功した場合、 io_cancel() は 0 を返す。失敗時の返り値については、「注
意」の節を参照すること。
エラー
EAGAIN 指定された iocb の取り消しが行われなかった。
EFAULT データ構造の中に無効なデータを指しているものがある。
EINVAL ctx_id で指定された AIO コンテキストが無効である。
ENOSYS io_cancel() はこのアーキテクチャでは実装されていない。
バージョン
非同期 I/O システム・コールは 2002年8月に Linux 2.5 で初めて登場した。
準拠
io_cancel() は Linux 固有であり、移植を想定したプログラムで使用すべきで
はない。
注意
glibc はこのシステムコール用のラッパー関数を提供していない。
libaio で io_cancel() 用に提供されているラッパー関数は、エラーの通知が
通常の C ライブラリの慣習にしたがっておらず、エラーの場合には負のエラー
番 号 (エラーの節に列挙されている値の一つを負にしたもの) が返り値となる
。 syscall(2) 経由でシステムコールを起動すると、返り値は通常のエラー 通
知の慣習にしたがってものとなり、エラーの場合には -1 が返り、 errno にエ
ラーを示す (正の) 値が設定される。
関連項目
io_destroy(2), io_getevents(2), io_setup(2), io_submit(2)
Linux 2008-06-18 IO_CANCEL(2)
IO_CANCEL(2) Linux Programmer’s Manual IO_CANCEL(2)
NAME
io_cancel - cancel an outstanding asynchronous I/O operation
SYNOPSIS
#include
int io_cancel(aio_context_t ctx_id, struct iocb *iocb,
struct io_event *result);
Link with -laio.
DESCRIPTION
io_cancel() attempts to cancel an asynchronous I/O operation previously
submitted with io_submit(2). ctx_id is the AIO context ID of the oper-
ation to be canceled. If the AIO context is found, the event will be
canceled and then copied into the memory pointed to by result without
being placed into the completion queue.
RETURN VALUE
On success, io_cancel() returns 0. For the failure return, see NOTES.
ERRORS
EAGAIN The iocb specified was not canceled.
EFAULT One of the data structures points to invalid data.
EINVAL The AIO context specified by ctx_id is invalid.
ENOSYS io_cancel() is not implemented on this architecture.
VERSIONS
The asynchronous I/O system calls first appeared in Linux 2.5, August
2002.
CONFORMING TO
io_cancel() is Linux-specific and should not be used in programs that
are intended to be portable.
NOTES
Glibc does not provide a wrapper function for this system call.
The wrapper provided in libaio for io_cancel() does not follow the
usual C library conventions for indicating error: on error it returns a
negated error number (the negative of one of the values listed in
ERRORS). If the system call is invoked via syscall(2), then the return
value follows the usual conventions for indicating an error: -1, with
errno set to a (positive) value that indicates the error.
SEE ALSO
io_destroy(2), io_getevents(2), io_setup(2), io_submit(2)
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/.
Linux 2008-06-18 IO_CANCEL(2)