diff options
Diffstat (limited to 'man7/aio.7')
-rw-r--r-- | man7/aio.7 | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH AIO 7 2023-05-03 "Linux man-pages 6.05.01" +.TH AIO 7 2023-10-31 "Linux man-pages 6.7" .SH NAME aio \- POSIX asynchronous I/O overview .SH DESCRIPTION @@ -13,7 +13,7 @@ The application can elect to be notified of completion of the I/O operation in a variety of ways: by delivery of a signal, by instantiation of a thread, or no notification at all. -.PP +.P The POSIX AIO interface consists of the following functions: .TP .BR aio_read (3) @@ -49,14 +49,14 @@ file descriptor. .TP .BR lio_listio (3) Enqueue multiple I/O requests using a single function call. -.PP +.P The .I aiocb ("asynchronous I/O control block") structure defines parameters that control an I/O operation. An argument of this type is employed with all of the functions listed above. This structure has the following form: -.PP +.P .in +4n .EX #include <aiocb.h> @@ -81,7 +81,7 @@ struct aiocb { enum { LIO_READ, LIO_WRITE, LIO_NOP }; .EE .in -.PP +.P The fields of this structure are as follows: .TP .I aio_fildes @@ -117,13 +117,13 @@ are and .BR SIGEV_THREAD . See -.BR sigevent (7) +.BR sigevent (3type) for further details. .TP .I aio_lio_opcode The type of operation to be performed; used only for .BR lio_listio (3). -.PP +.P In addition to the standard functions listed above, the GNU C library provides the following extension to the POSIX AIO API: .TP @@ -151,11 +151,11 @@ The control block buffer and the buffer pointed to by .I aio_buf must not be changed while the I/O operation is in progress. These buffers must remain valid until the I/O operation completes. -.PP +.P Simultaneous asynchronous read or write operations using the same .I aiocb structure yield undefined results. -.PP +.P The current Linux POSIX AIO implementation is provided in user space by glibc. This has a number of limitations, most notably that maintaining multiple threads to perform I/O operations is expensive and scales poorly. @@ -186,18 +186,18 @@ of a signal. After all I/O requests have completed, the program retrieves their status using .BR aio_return (3). -.PP +.P The .B SIGQUIT signal (generated by typing control-\e) causes the program to request cancelation of each of the outstanding requests using .BR aio_cancel (3). -.PP +.P Here is an example of what we might see when running this program. In this example, the program queues two requests to standard input, and these are satisfied by two lines of input containing "abc" and "x". -.PP +.P .in +4n .EX $ \fB./a.out /dev/stdin /dev/stdin\fP @@ -438,7 +438,7 @@ main(int argc, char *argv[]) .BR aio_return (3), .BR aio_write (3), .BR lio_listio (3) -.PP +.P "Asynchronous I/O Support in Linux 2.5", Bhattacharya, Pratt, Pulavarty, and Morgan, Proceedings of the Linux Symposium, 2003, |