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
12 aio.h — asynchronous input and output
13
15 #include <aio.h>
16
18 The <aio.h> header shall define the aiocb structure, which shall
19 include at least the following members:
20
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 <aio.h> header shall define the sigevent structure and sigval union
37 as described in <signal.h>.
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
75 int aio_cancel(int, struct aiocb *);
76 int aio_error(const struct aiocb *);
77 int aio_fsync(int, struct aiocb *);
78 int aio_read(struct aiocb *);
79 ssize_t aio_return(struct aiocb *);
80 int aio_suspend(const struct aiocb *const [], int,
81 const struct timespec *);
82 int aio_write(struct aiocb *);
83 int lio_listio(int, struct aiocb *restrict const [restrict], int,
84 struct sigevent *restrict);
85
86 Inclusion of the <aio.h> header may make visible symbols defined in the
87 headers <fcntl.h>, <signal.h>, and <time.h>.
88
89 The following sections are informative.
90
92 None.
93
95 None.
96
98 None.
99
101 <fcntl.h>, <signal.h>, <sys_types.h>, <time.h>
102
103 The System Interfaces volume of POSIX.1‐2017, aio_cancel(),
104 aio_error(), aio_fsync(), aio_read(), aio_return(), aio_suspend(),
105 aio_write(), fsync(), lio_listio(), lseek(), read(), write()
106
108 Portions of this text are reprinted and reproduced in electronic form
109 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
110 table Operating System Interface (POSIX), The Open Group Base Specifi‐
111 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
112 Electrical and Electronics Engineers, Inc and The Open Group. 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.opengroup.org/unix/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 2017 aio.h(0P)