]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/aio.7
iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd...
[thirdparty/man-pages.git] / man7 / aio.7
index 47ceea7c95ec8dbe69a3d4645c7fff6176426a12..b32a08589a1a39ef0958b933b6498b1043e6660e 100644 (file)
@@ -23,7 +23,7 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH AIO 7 2016-03-15 "Linux" "Linux Programmer's Manual"
+.TH AIO 7 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 aio \- POSIX asynchronous I/O overview
 .SH DESCRIPTION
@@ -34,7 +34,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
 The POSIX AIO interface consists of the following functions:
 .TP 16
 .BR aio_read (3)
@@ -79,7 +79,7 @@ An argument of this type is employed with all of the functions listed above.
 This structure has the following form:
 .PP
 .in +4n
-.nf
+.EX
 #include <aiocb.h>
 
 struct aiocb {
@@ -100,9 +100,9 @@ struct aiocb {
 /* Operation codes for \(aqaio_lio_opcode\(aq: */
 
 enum { LIO_READ, LIO_WRITE, LIO_NOP };
-
-.fi
+.EE
 .in
+.PP
 The fields of this structure are as follows:
 .TP 16
 .I aio_filedes
@@ -171,11 +171,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
 Simultaneous asynchronous read or write operations using the same
 .I aiocb
 structure yield undefined results.
-
+.PP
 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.
@@ -206,20 +206,20 @@ of a signal.
 After all I/O requests have completed,
 the program retrieves their status using
 .BR aio_return (3).
-
+.PP
 The
 .B SIGQUIT
 signal (generated by typing control-\\) causes the program to request
 cancellation of each of the outstanding requests using
 .BR aio_cancel (3).
-
+.PP
 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
 .in +4n
-.nf
+.EX
 $ \fB./a.out /dev/stdin /dev/stdin\fP
 opened /dev/stdin on descriptor 3
 opened /dev/stdin on descriptor 4
@@ -241,11 +241,11 @@ All I/O requests completed
 aio_return():
     for request 0 (descriptor 3): 4
     for request 1 (descriptor 4): 2
-.fi
+.EE
 .in
 .SS Program source
 \&
-.nf
+.EX
 #include <fcntl.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -446,7 +446,7 @@ main(int argc, char *argv[])
 
     exit(EXIT_SUCCESS);
 }
-.fi
+.EE
 .SH SEE ALSO
 .ad l
 .nh
@@ -462,9 +462,9 @@ main(int argc, char *argv[])
 .BR aio_return (3),
 .BR aio_write (3),
 .BR lio_listio (3)
-
+.PP
 "Asynchronous I/O Support in Linux 2.5",
 Bhattacharya, Pratt, Pulavarty, and Morgan,
 Proceedings of the Linux Symposium, 2003,
-.UR https://www.kernel.org/doc/ols/2003/ols2003-pages-351-366.pdf
+.UR https://www.kernel.org/doc/ols/2003/ols2003\-pages\-351\-366.pdf
 .UE