OSDN Git Service

(split) LDP man-pages の original/ を v3.29 に更新。
[linuxjm/LDP_man-pages.git] / original / man2 / io_destroy.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 .\" .de Sh \" Subsection
6 .\" .br
7 .\" .if t .Sp
8 .\" .ne 5
9 .\" .PP
10 .\" \fB\\$1\fP
11 .\" .PP
12 .\" ..
13 .\" .de Sp \" Vertical space (when we can't use .PP)
14 .\" .if t .sp .5v
15 .\" .if n .sp
16 .\" ..
17 .\" .de Ip \" List item
18 .\" .br
19 .\" .ie \\n(.$>=3 .ne \\$3
20 .\" .el .ne 3
21 .\" .IP "\\$1" \\$2
22 .\" ..
23 .TH IO_DESTROY 2 2008-06-18 "Linux" "Linux Programmer's Manual"
24 .SH NAME
25 io_destroy \- destroy an asynchronous I/O context
26 .SH "SYNOPSIS"
27 .nf
28 .\" .ad l
29 .\" .hy 0
30 .B #include <libaio.h>
31 .\" #include <linux/aio.h>
32 .sp
33 .\" .HP 17
34 .BI "int io_destroy(aio_context_t " ctx );
35 .\" .ad
36 .\" .hy
37 .sp
38 Link with \fI\-laio\fP.
39 .fi
40 .SH "DESCRIPTION"
41 .PP
42 .BR io_destroy ()
43 removes the asynchronous I/O context from the list of
44 I/O contexts and then destroys it.
45 .BR io_destroy ()
46 can also cancel any outstanding asynchronous I/O
47 actions on \fIctx\fP and block on completion.
48 .SH "RETURN VALUE"
49 On success,
50 .BR io_destroy ()
51 returns 0.
52 For the failure return, see NOTES.
53 .SH "ERRORS"
54 .TP
55 .B EFAULT
56 The context pointed to is invalid.
57 .TP
58 .B EINVAL
59 The AIO context specified by \fIctx\fP is invalid.
60 .TP
61 .B ENOSYS
62 .BR io_destroy ()
63 is not implemented on this architecture.
64 .SH "VERSIONS"
65 .PP
66 The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
67 .SH "CONFORMING TO"
68 .PP
69 .BR io_destroy ()
70 is Linux-specific and should not be used in programs
71 that are intended to be portable.
72 .SH NOTES
73 Glibc does not provide a wrapper function for this system call.
74
75 The wrapper provided in
76 .I libaio
77 for
78 .BR io_destroy ()
79 does not follow the usual C library conventions for indicating error:
80 on error it returns a negated error number
81 (the negative of one of the values listed in ERRORS).
82 If the system call is invoked via
83 .BR syscall (2),
84 then the return value follows the usual conventions for
85 indicating an error: \-1, with
86 .I errno
87 set to a (positive) value that indicates the error.
88 .SH "SEE ALSO"
89 .BR io_cancel (2),
90 .BR io_getevents (2),
91 .BR io_setup (2),
92 .BR io_submit (2),
93 .BR aio (7)
94 .\" .SH "NOTES"
95 .\"
96 .\" .PP
97 .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
98 .\"
99 .\" .SH AUTHOR
100 .\" Kent Yoder.