1aio.h(0P) POSIX Programmer's Manual aio.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 aio.h — asynchronous input and output
14
16 #include <aio.h>
17
19 The <aio.h> header shall define the aiocb structure, which shall
20 include at least the following members:
21
22 int aio_fildes File descriptor.
23 off_t aio_offset File offset.
24 volatile void *aio_buf Location of buffer.
25 size_t aio_nbytes Length of transfer.
26 int aio_reqprio Request priority offset.
27 struct sigevent aio_sigevent Signal number and value.
28 int aio_lio_opcode Operation to be performed.
29
30 The <aio.h> header shall define the off_t, pthread_attr_t, size_t, and
31 ssize_t types as described in <sys/types.h>.
32
33 The <aio.h> header shall define the struct timespec structure as
34 described in <time.h>.
35
36 The tag sigevent shall be declared as naming an incomplete structure
37 type, the contents of which are described in the <signal.h> header.
38
39 The <aio.h> header shall define the following symbolic constants:
40
41 AIO_ALLDONE A return value indicating that none of the requested
42 operations could be canceled since they are already com‐
43 plete.
44
45 AIO_CANCELED A return value indicating that all requested operations
46 have been canceled.
47
48 AIO_NOTCANCELED
49 A return value indicating that some of the requested
50 operations could not be canceled since they are in
51 progress.
52
53 LIO_NOP A lio_listio() element operation option indicating that
54 no transfer is requested.
55
56 LIO_NOWAIT A lio_listio() synchronization operation indicating that
57 the calling thread is to continue execution while the
58 lio_listio() operation is being performed, and no notifi‐
59 cation is given when the operation is complete.
60
61 LIO_READ A lio_listio() element operation option requesting a
62 read.
63
64 LIO_WAIT A lio_listio() synchronization operation indicating that
65 the calling thread is to suspend until the lio_listio()
66 operation is complete.
67
68 LIO_WRITE A lio_listio() element operation option requesting a
69 write.
70
71 The following shall be declared as functions and may also be defined as
72 macros. Function prototypes shall be provided.
73
74 int aio_cancel(int, struct aiocb *);
75 int aio_error(const struct aiocb *);
76 int aio_fsync(int, struct aiocb *);
77 int aio_read(struct aiocb *);
78 ssize_t aio_return(struct aiocb *);
79 int aio_suspend(const struct aiocb *const [], int,
80 const struct timespec *);
81 int aio_write(struct aiocb *);
82 int lio_listio(int, struct aiocb *restrict const [restrict], int,
83 struct sigevent *restrict);
84
85 Inclusion of the <aio.h> header may make visible symbols defined in the
86 headers <fcntl.h>, <signal.h>, and <time.h>.
87
88 The following sections are informative.
89
91 None.
92
94 None.
95
97 None.
98
100 <fcntl.h>, <signal.h>, <sys_types.h>, <time.h>
101
102 The System Interfaces volume of POSIX.1‐2008, aio_cancel(),
103 aio_error(), aio_fsync(), aio_read(), aio_return(), aio_suspend(),
104 aio_write(), fsync(), lio_listio(), lseek(), read(), write()
105
107 Portions of this text are reprinted and reproduced in electronic form
108 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
109 -- Portable Operating System Interface (POSIX), The Open Group Base
110 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
111 cal and Electronics Engineers, Inc and The Open Group. (This is
112 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
113 event of any discrepancy between this version and the original IEEE and
114 The Open Group Standard, the original IEEE and The Open Group Standard
115 is the referee document. The original Standard can be obtained online
116 at http://www.unix.org/online.html .
117
118 Any typographical or formatting errors that appear in this page are
119 most likely to have been introduced during the conversion of the source
120 files to man page format. To report such errors, see https://www.ker‐
121 nel.org/doc/man-pages/reporting_bugs.html .
122
123
124
125IEEE/The Open Group 2013 aio.h(0P)