OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man2 / io_cancel.2
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.
4 .\"
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>
7 .\"
8 .\"WORD:        operation       Áàºî
9 .\"WORD:        completion queue        ´°Î»¥­¥å¡¼
10 .\"
11 .\" .de Sh \" Subsection
12 .\" .br
13 .\" .if t .Sp
14 .\" .ne 5
15 .\" .PP
16 .\" \fB\\$1\fP
17 .\" .PP
18 .\" ..
19 .\" .de Sp \" Vertical space (when we can't use .PP)
20 .\" .if t .sp .5v
21 .\" .if n .sp
22 .\" ..
23 .\" .de Ip \" List item
24 .\" .br
25 .\" .ie \\n(.$>=3 .ne \\$3
26 .\" .el .ne 3
27 .\" .IP "\\$1" \\$2
28 .\" ..
29 .TH IO_CANCEL 2 2008-06-18 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .\"O io_cancel \- cancel an outstanding asynchronous I/O operation
32 .SH Ì¾Á°
33 io_cancel \- Ì¤½èÍý¤ÎÈóƱ´ü I/O Áàºî¤Î¼è¤ê¾Ã¤·
34 .\"O .SH "SYNOPSIS"
35 .SH ½ñ¼°
36 .nf
37 .\" .ad l
38 .\" .hy 0
39 .\"
40 .B #include <libaio.h>
41 .\"#include <linux/aio.h>
42 .sp
43 .\" .HP 16
44 .BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb ,
45 .BI "              struct io_event *" result );
46 .\" .ad
47 .\" .hy
48 .sp
49 .\"O Link with \fI\-laio\fP.
50 \fI\-laio\fP ¤È¥ê¥ó¥¯¤¹¤ë¡£
51 .fi
52 .\"O .SH "DESCRIPTION"
53 .SH ÀâÌÀ
54 .PP
55 .\"O .BR io_cancel ()
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.
62 .BR io_cancel ()
63 ¤Ï¡¢²áµî¤Ë
64 .BR io_submit (2)
65 ¤ò»È¤Ã¤ÆÅÐÏ¿¤µ¤ì¤¿ÈóƱ´ü I/O (AIO) Áàºî¤Î¼è¤ê¾Ã¤·¤ò¹Ô¤ª¤¦¤È¤¹¤ë¡£
66 \fIctx_id\fP ¤Ï¡¢¼è¤ê¾Ã¤·¤ò¹Ô¤¦Áàºî¤Î AIO ¥³¥ó¥Æ¥­¥¹¥È¤Î ID ¤Ç¤¢¤ë¡£
67 »ØÄꤷ¤¿ AIO ¥³¥ó¥Æ¥­¥¹¥È¤¬¸«¤Ä¤«¤ë¤È¡¢
68 ÂоݤΥ¤¥Ù¥ó¥È¤Î¼è¤ê¾Ã¤·¤¬¹Ô¤ï¤ì¡¢¤½¤Î¸å \fIresult\fP ¤Ç»Ø¤µ¤ì¤¿¥á¥â¥ê¤Ë
69 ¥³¥Ô¡¼¤µ¤ì¤ë (¤³¤Î¤È¤­¡¢´°Î»¥­¥å¡¼¤Ø¤Î°ÜÆ°¤Ï¹Ô¤ï¤ì¤Ê¤¤)¡£
70 .\"O .SH "RETURN VALUE"
71 .SH ÊÖ¤êÃÍ
72 .\"O On success,
73 .\"O .BR io_cancel ()
74 .\"O returns 0.
75 .\"O For the failure return, see NOTES.
76 À®¸ù¤·¤¿¾ì¹ç¡¢
77 .BR io_cancel ()
78 ¤Ï 0 ¤òÊÖ¤¹¡£
79 ¼ºÇÔ»þ¤ÎÊÖ¤êÃͤˤĤ¤¤Æ¤Ï¡¢¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¤¹¤ë¤³¤È¡£
80 .\"O .SH "ERRORS"
81 .SH ¥¨¥é¡¼
82 .TP
83 .B EAGAIN
84 .\"O The \fIiocb\fP specified was not canceled.
85 »ØÄꤵ¤ì¤¿ \fIiocb\fP ¤Î¼è¤ê¾Ã¤·¤¬¹Ô¤ï¤ì¤Ê¤«¤Ã¤¿¡£
86 .TP
87 .B EFAULT
88 .\"O One of the data structures points to invalid data.
89 ¥Ç¡¼¥¿¹½Â¤¤ÎÃæ¤Ë̵¸ú¤Ê¥Ç¡¼¥¿¤ò»Ø¤·¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ë¡£
90 .TP
91 .B EINVAL
92 .\"O The AIO context specified by \fIctx_id\fP is invalid.
93 \fIctx_id\fP ¤Ç»ØÄꤵ¤ì¤¿ AIO ¥³¥ó¥Æ¥­¥¹¥È¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
94 .TP
95 .B ENOSYS
96 .\"O .BR io_cancel ()
97 .\"O is not implemented on this architecture.
98 .BR io_cancel ()
99 ¤Ï¤³¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
100 .\"O .SH "VERSIONS"
101 .SH ¥Ð¡¼¥¸¥ç¥ó
102 .PP
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"
106 .SH ½àµò
107 .PP
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.
111 .BR io_cancel ()
112 ¤Ï Linux ¸ÇÍ­¤Ç¤¢¤ê¡¢°Ü¿¢¤òÁÛÄꤷ¤¿¥×¥í¥°¥é¥à¤Ç»ÈÍѤ¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
113 .\"O .SH NOTES
114 .SH Ãí°Õ
115 .\"O Glibc does not provide a wrapper function for this system call.
116 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ëÍѤΥé¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
117
118 .\"O The wrapper provided in
119 .\"O .I libaio
120 .\"O for
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
129 .\"O .I errno
130 .\"O set to a (positive) value that indicates the error.
131 .I libaio
132 ¤Ç
133 .BR io_cancel ()
134 ÍѤËÄ󶡤µ¤ì¤Æ¤¤¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤ÎÄÌÃΤ¬Ä̾ï¤Î C ¥é¥¤¥Ö¥é¥ê¤Î
135 ´·½¬¤Ë¤·¤¿¤¬¤Ã¤Æ¤ª¤é¤º¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤ÏÉé¤Î¥¨¥é¡¼ÈÖ¹æ
136 (¥¨¥é¡¼¤ÎÀá¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÃͤΰì¤Ä¤òÉé¤Ë¤·¤¿¤â¤Î) ¤¬ÊÖ¤êÃͤȤʤ롣
137 .BR syscall (2)
138 ·Ðͳ¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤¹¤ë¤È¡¢ÊÖ¤êÃͤÏÄ̾ï¤Î¥¨¥é¡¼ÄÌÃΤδ·½¬¤Ë
139 ¤·¤¿¤¬¤Ã¤Æ¤â¤Î¤È¤Ê¤ê¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤¬Ê֤ꡢ
140 .I errno
141 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ (Àµ¤Î) Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
142 .\"O .SH "SEE ALSO"
143 .SH ´ØÏ¢¹àÌÜ
144 .BR io_destroy (2),
145 .BR io_getevents (2),
146 .BR io_setup (2),
147 .BR io_submit (2),
148 .BR aio (7)
149 .\"O .\" .SH "NOTES"
150 .\" .SH Ãí
151 .\" .PP
152 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
153 .\" ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Benjamin LaHaise ¤¬½ñ¤¤¤¿¡£
154 .\"O .\" .SH AUTHOR
155 .\" .SH Ãø¼Ô
156 .\" Kent Yoder.