1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
5 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI, all rights reserved.
6 .\" Translated Mon Mar 8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
8 .\"WORD: operation Áàºî
9 .\"WORD: completion queue ´°Î»¥¥å¡¼
11 .\" .de Sh \" Subsection
19 .\" .de Sp \" Vertical space (when we can't use .PP)
23 .\" .de Ip \" List item
25 .\" .ie \\n(.$>=3 .ne \\$3
29 .TH IO_CANCEL 2 2008-06-18 "Linux" "Linux Programmer's Manual"
31 .\"O io_cancel \- cancel an outstanding asynchronous I/O operation
33 io_cancel \- ̤½èÍý¤ÎÈóƱ´ü I/O Áàºî¤Î¼è¤ê¾Ã¤·
40 .B #include <libaio.h>
41 .\"#include <linux/aio.h>
44 .BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb ,
45 .BI " struct io_event *" result );
49 .\"O Link with \fI\-laio\fP.
50 \fI\-laio\fP ¤È¥ê¥ó¥¯¤¹¤ë¡£
52 .\"O .SH "DESCRIPTION"
56 .\"O attempts to cancel an asynchronous I/O operation previously submitted with
57 .\"O .BR io_submit (2).
58 .\"O \fIctx_id\fP is the AIO context ID of the operation to be canceled.
59 .\"O If the AIO context is found, the event will be canceled and then copied
60 .\"O into the memory pointed to by \fIresult\fP without being placed
61 .\"O into the completion queue.
65 ¤ò»È¤Ã¤ÆÅÐÏ¿¤µ¤ì¤¿ÈóƱ´ü I/O (AIO) Áàºî¤Î¼è¤ê¾Ã¤·¤ò¹Ô¤ª¤¦¤È¤¹¤ë¡£
66 \fIctx_id\fP ¤Ï¡¢¼è¤ê¾Ã¤·¤ò¹Ô¤¦Áàºî¤Î AIO ¥³¥ó¥Æ¥¥¹¥È¤Î ID ¤Ç¤¢¤ë¡£
67 »ØÄꤷ¤¿ AIO ¥³¥ó¥Æ¥¥¹¥È¤¬¸«¤Ä¤«¤ë¤È¡¢
68 ÂоݤΥ¤¥Ù¥ó¥È¤Î¼è¤ê¾Ã¤·¤¬¹Ô¤ï¤ì¡¢¤½¤Î¸å \fIresult\fP ¤Ç»Ø¤µ¤ì¤¿¥á¥â¥ê¤Ë
69 ¥³¥Ô¡¼¤µ¤ì¤ë (¤³¤Î¤È¤¡¢´°Î»¥¥å¡¼¤Ø¤Î°ÜÆ°¤Ï¹Ô¤ï¤ì¤Ê¤¤)¡£
70 .\"O .SH "RETURN VALUE"
75 .\"O For the failure return, see NOTES.
79 ¼ºÇÔ»þ¤ÎÊÖ¤êÃͤˤĤ¤¤Æ¤Ï¡¢¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¤¹¤ë¤³¤È¡£
84 .\"O The \fIiocb\fP specified was not canceled.
85 »ØÄꤵ¤ì¤¿ \fIiocb\fP ¤Î¼è¤ê¾Ã¤·¤¬¹Ô¤ï¤ì¤Ê¤«¤Ã¤¿¡£
88 .\"O One of the data structures points to invalid data.
89 ¥Ç¡¼¥¿¹½Â¤¤ÎÃæ¤Ë̵¸ú¤Ê¥Ç¡¼¥¿¤ò»Ø¤·¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ë¡£
92 .\"O The AIO context specified by \fIctx_id\fP is invalid.
93 \fIctx_id\fP ¤Ç»ØÄꤵ¤ì¤¿ AIO ¥³¥ó¥Æ¥¥¹¥È¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
97 .\"O is not implemented on this architecture.
99 ¤Ï¤³¤Î¥¢¡¼¥¥Æ¥¯¥Á¥ã¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
103 .\"O The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
104 ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï 2002ǯ8·î¤Ë Linux 2.5 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
105 .\"O .SH "CONFORMING TO"
108 .\"O .BR io_cancel ()
109 .\"O is Linux-specific and should not be used
110 .\"O in programs that are intended to be portable.
112 ¤Ï Linux ¸ÇͤǤ¢¤ê¡¢°Ü¿¢¤òÁÛÄꤷ¤¿¥×¥í¥°¥é¥à¤Ç»ÈÍѤ¹¤Ù¤¤Ç¤Ï¤Ê¤¤¡£
115 .\"O Glibc does not provide a wrapper function for this system call.
116 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ëÍѤΥé¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
118 .\"O The wrapper provided in
121 .\"O .BR io_cancel ()
122 .\"O does not follow the usual C library conventions for indicating error:
123 .\"O on error it returns a negated error number
124 .\"O (the negative of one of the values listed in ERRORS).
125 .\"O If the system call is invoked via
126 .\"O .BR syscall (2),
127 .\"O then the return value follows the usual conventions for
128 .\"O indicating an error: \-1, with
130 .\"O set to a (positive) value that indicates the error.
134 ÍѤËÄ󶡤µ¤ì¤Æ¤¤¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤ÎÄÌÃΤ¬Ä̾ï¤Î C ¥é¥¤¥Ö¥é¥ê¤Î
135 ´·½¬¤Ë¤·¤¿¤¬¤Ã¤Æ¤ª¤é¤º¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤ÏÉé¤Î¥¨¥é¡¼ÈÖ¹æ
136 (¥¨¥é¡¼¤ÎÀá¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÃͤΰì¤Ä¤òÉé¤Ë¤·¤¿¤â¤Î) ¤¬ÊÖ¤êÃͤȤʤ롣
138 ·Ðͳ¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤¹¤ë¤È¡¢ÊÖ¤êÃͤÏÄ̾ï¤Î¥¨¥é¡¼ÄÌÃΤδ·½¬¤Ë
139 ¤·¤¿¤¬¤Ã¤Æ¤â¤Î¤È¤Ê¤ê¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤¬Ê֤ꡢ
141 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ (Àµ¤Î) Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
145 .BR io_getevents (2),
152 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
153 .\" ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Benjamin LaHaise ¤¬½ñ¤¤¤¿¡£