1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-09-28 04:06+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man7/aio.7:26
26 #: build/C/man7/aio.7:26
32 #: build/C/man7/aio.7:26 build/C/man3/aio_init.3:26 build/C/man2/io_cancel.2:7 build/C/man2/io_destroy.2:7 build/C/man2/io_getevents.2:7 build/C/man2/io_setup.2:7 build/C/man2/io_submit.2:7
38 #: build/C/man7/aio.7:26 build/C/man3/aio_cancel.3:24 build/C/man3/aio_error.3:24 build/C/man3/aio_fsync.3:24 build/C/man3/aio_init.3:26 build/C/man3/aio_read.3:24 build/C/man3/aio_return.3:24 build/C/man3/aio_suspend.3:25 build/C/man3/aio_write.3:24 build/C/man2/io_cancel.2:7 build/C/man2/io_destroy.2:7 build/C/man2/io_getevents.2:7 build/C/man2/io_setup.2:7 build/C/man2/io_submit.2:7 build/C/man3/lio_listio.3:24
40 msgid "Linux Programmer's Manual"
44 #: build/C/man7/aio.7:27 build/C/man3/aio_cancel.3:25 build/C/man3/aio_error.3:25 build/C/man3/aio_fsync.3:25 build/C/man3/aio_init.3:27 build/C/man3/aio_read.3:25 build/C/man3/aio_return.3:25 build/C/man3/aio_suspend.3:26 build/C/man3/aio_write.3:25 build/C/man2/io_cancel.2:8 build/C/man2/io_destroy.2:8 build/C/man2/io_getevents.2:8 build/C/man2/io_setup.2:8 build/C/man2/io_submit.2:8 build/C/man3/lio_listio.3:25
50 #: build/C/man7/aio.7:29
51 msgid "aio - POSIX asynchronous I/O overview"
55 #: build/C/man7/aio.7:29 build/C/man3/aio_cancel.3:33 build/C/man3/aio_error.3:33 build/C/man3/aio_fsync.3:33 build/C/man3/aio_init.3:38 build/C/man3/aio_read.3:33 build/C/man3/aio_return.3:33 build/C/man3/aio_suspend.3:39 build/C/man3/aio_write.3:33 build/C/man2/io_cancel.2:20 build/C/man2/io_destroy.2:19 build/C/man2/io_getevents.2:22 build/C/man2/io_setup.2:19 build/C/man2/io_submit.2:20 build/C/man3/lio_listio.3:36
61 #: build/C/man7/aio.7:37
63 "The POSIX asynchronous I/O (AIO) interface allows applications to initiate "
64 "one or more I/O operations that are performed asynchronously (i.e., in the "
65 "background). The application can elect to be notified of completion of the "
66 "I/O operation in a variety of ways: by delivery of a signal, by "
67 "instantiation of a thread, or no notification at all."
71 #: build/C/man7/aio.7:39
72 msgid "The POSIX AIO interface consists of the following functions:"
76 #: build/C/man7/aio.7:39
78 msgid "B<aio_read>(3)"
82 #: build/C/man7/aio.7:44
83 msgid "Enqueue a read request. This is the asynchronous analog of B<read>(2)."
87 #: build/C/man7/aio.7:44
89 msgid "B<aio_write>(3)"
93 #: build/C/man7/aio.7:49
94 msgid "Enqueue a write request. This is the asynchronous analog of B<write>(2)."
98 #: build/C/man7/aio.7:49
100 msgid "B<aio_fsync>(3)"
104 #: build/C/man7/aio.7:56
106 "Enqueue a sync request for the I/O operations on a file descriptor. This is "
107 "the asynchronous analog of B<fsync>(2) and B<fdatasync>(2)."
111 #: build/C/man7/aio.7:56
113 msgid "B<aio_error>(3)"
117 #: build/C/man7/aio.7:59
118 msgid "Obtain the error status of an enqueued I/O request."
122 #: build/C/man7/aio.7:59
124 msgid "B<aio_return>(3)"
128 #: build/C/man7/aio.7:62
129 msgid "Obtain the return status of a completed I/O request."
133 #: build/C/man7/aio.7:62
135 msgid "B<aio_suspend>(3)"
139 #: build/C/man7/aio.7:66
141 "Suspend the caller until one or more of a specified set of I/O requests "
146 #: build/C/man7/aio.7:66
148 msgid "B<aio_cancel>(3)"
152 #: build/C/man7/aio.7:70
153 msgid "Attempt to cancel outstanding I/O requests on a specified file descriptor."
157 #: build/C/man7/aio.7:70
159 msgid "B<lio_listio>(3)"
163 #: build/C/man7/aio.7:73
164 msgid "Enqueue multiple I/O requests using a single function call."
168 #: build/C/man7/aio.7:80
170 "The I<aiocb> (\"asynchronous I/O control block\") structure defines "
171 "parameters that control an I/O operation. An argument of this type is "
172 "employed with all of the functions listed above. This structure has the "
177 #: build/C/man7/aio.7:84
179 msgid "#include E<lt>aiocb.hE<gt>\n"
183 #: build/C/man7/aio.7:87
187 " /* The order of these fields is implementation-dependent */\n"
191 #: build/C/man7/aio.7:96
194 " int aio_fildes; /* File descriptor */\n"
195 " off_t aio_offset; /* File offset */\n"
196 " volatile void *aio_buf; /* Location of buffer */\n"
197 " size_t aio_nbytes; /* Length of transfer */\n"
198 " int aio_reqprio; /* Request priority */\n"
199 " struct sigevent aio_sigevent; /* Notification method */\n"
200 " int aio_lio_opcode; /* Operation to be performed;\n"
201 " lio_listio() only */\n"
205 #: build/C/man7/aio.7:99
208 " /* Various implementation-internal fields not shown */\n"
213 #: build/C/man7/aio.7:101
215 msgid "/* Operation codes for \\(aqaio_lio_opcode\\(aq: */\n"
219 #: build/C/man7/aio.7:103
221 msgid "enum { LIO_READ, LIO_WRITE, LIO_NOP };\n"
225 #: build/C/man7/aio.7:107
226 msgid "The fields of this structure are as follows:"
230 #: build/C/man7/aio.7:107
232 msgid "I<aio_filedes>"
236 #: build/C/man7/aio.7:110
237 msgid "The file descriptor on which the I/O operation is to be performed."
241 #: build/C/man7/aio.7:110
243 msgid "I<aio_offset>"
247 #: build/C/man7/aio.7:113
248 msgid "This is the file offset at which the I/O operation is to be performed."
252 #: build/C/man7/aio.7:113
258 #: build/C/man7/aio.7:116
259 msgid "This is the buffer used to transfer data for a read or write operation."
263 #: build/C/man7/aio.7:116
265 msgid "I<aio_nbytes>"
269 #: build/C/man7/aio.7:120
270 msgid "This is the size of the buffer pointed to by I<aio_buf>."
274 #: build/C/man7/aio.7:120
276 msgid "I<aio_reqprio>"
280 #: build/C/man7/aio.7:129
282 "This field specifies a value that is subtracted from the calling thread's "
283 "real-time priority in order to determine the priority for execution of this "
284 "I/O request (see B<pthread_setschedparam>(3)). The specified value must be "
285 "between 0 and the value returned by I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>. "
286 "This field is ignored for file synchronization operations."
290 #: build/C/man7/aio.7:129
292 msgid "I<aio_sigevent>"
296 #: build/C/man7/aio.7:143
298 "This field is a structure that specifies how the caller is to be notified "
299 "when the asynchronous I/O operation completes. Possible values for "
300 "I<aio_sigevent.sigev_notify> are B<SIGEV_NONE>, B<SIGEV_SIGNAL>, and "
301 "B<SIGEV_THREAD>. See B<sigevent>(7) for further details."
305 #: build/C/man7/aio.7:143
307 msgid "I<aio_lio_opcode>"
311 #: build/C/man7/aio.7:147
312 msgid "The type of operation to be performed; used only for B<lio_listio>(3)."
316 #: build/C/man7/aio.7:150
318 "In addition to the standard functions listed above, the GNU C library "
319 "provides the following extension to the POSIX AIO API:"
323 #: build/C/man7/aio.7:150
325 msgid "B<aio_init>(3)"
329 #: build/C/man7/aio.7:153
331 "Set parameters for tuning the behavior of the glibc POSIX AIO "
336 #: build/C/man7/aio.7:153 build/C/man3/aio_cancel.3:101 build/C/man3/aio_error.3:66 build/C/man3/aio_fsync.3:79 build/C/man3/aio_read.3:103 build/C/man3/aio_return.3:63 build/C/man3/aio_suspend.3:88 build/C/man3/aio_write.3:110 build/C/man2/io_cancel.2:42 build/C/man2/io_destroy.2:34 build/C/man2/io_getevents.2:40 build/C/man2/io_setup.2:37 build/C/man2/io_submit.2:37 build/C/man3/lio_listio.3:146
342 #: build/C/man7/aio.7:154 build/C/man3/aio_error.3:67 build/C/man3/aio_fsync.3:87 build/C/man3/aio_read.3:111 build/C/man3/aio_return.3:64 build/C/man3/aio_write.3:122 build/C/man2/io_cancel.2:49 build/C/man2/io_destroy.2:38 build/C/man2/io_getevents.2:44 build/C/man2/io_setup.2:46 build/C/man2/io_submit.2:47 build/C/man3/lio_listio.3:161
348 #: build/C/man7/aio.7:163
350 "The I<aio_reqprio> field of the I<aiocb> structure was less than 0, or was "
351 "greater than the limit returned by the call "
352 "I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>."
356 #: build/C/man7/aio.7:163 build/C/man3/aio_cancel.3:110 build/C/man3/aio_error.3:78 build/C/man3/aio_fsync.3:99 build/C/man3/aio_init.3:93 build/C/man3/aio_read.3:128 build/C/man3/aio_return.3:73 build/C/man3/aio_suspend.3:103 build/C/man3/aio_write.3:133 build/C/man2/io_cancel.2:56 build/C/man2/io_destroy.2:45 build/C/man2/io_getevents.2:57 build/C/man2/io_setup.2:58 build/C/man2/io_submit.2:60 build/C/man3/lio_listio.3:201
362 #: build/C/man7/aio.7:165
363 msgid "The POSIX AIO interfaces are provided by glibc since version 2.1."
367 #: build/C/man7/aio.7:165 build/C/man3/aio_cancel.3:114 build/C/man3/aio_error.3:87 build/C/man3/aio_fsync.3:103 build/C/man3/aio_init.3:97 build/C/man3/aio_read.3:132 build/C/man3/aio_return.3:82 build/C/man3/aio_suspend.3:107 build/C/man3/aio_write.3:137 build/C/man2/io_cancel.2:59 build/C/man2/io_destroy.2:48 build/C/man2/io_getevents.2:60 build/C/man2/io_setup.2:61 build/C/man2/io_submit.2:63 build/C/man3/lio_listio.3:205
369 msgid "CONFORMING TO"
373 #: build/C/man7/aio.7:167 build/C/man3/aio_cancel.3:116 build/C/man3/aio_error.3:89 build/C/man3/aio_fsync.3:105 build/C/man3/aio_read.3:134 build/C/man3/aio_return.3:84 build/C/man3/aio_suspend.3:109 build/C/man3/aio_write.3:139 build/C/man3/lio_listio.3:207
374 msgid "POSIX.1-2001, POSIX.1-2008."
378 #: build/C/man7/aio.7:167 build/C/man3/aio_read.3:134 build/C/man3/aio_suspend.3:109 build/C/man3/aio_write.3:139 build/C/man2/io_cancel.2:64 build/C/man2/io_destroy.2:53 build/C/man2/io_getevents.2:65 build/C/man2/io_setup.2:66 build/C/man2/io_submit.2:68 build/C/man3/lio_listio.3:207
384 #: build/C/man7/aio.7:174
386 "It is a good idea to zero out the control block buffer before use (see "
387 "B<memset>(3)). The control block buffer and the buffer pointed to by "
388 "I<aio_buf> must not be changed while the I/O operation is in progress. "
389 "These buffers must remain valid until the I/O operation completes."
393 #: build/C/man7/aio.7:178
395 "Simultaneous asynchronous read or write operations using the same I<aiocb> "
396 "structure yield undefined results."
399 #. http://lse.sourceforge.net/io/aio.html
400 #. http://lse.sourceforge.net/io/aionotes.txt
401 #. http://lwn.net/Articles/148755/
403 #: build/C/man7/aio.7:196
405 "The current Linux POSIX AIO implementation is provided in user space by "
406 "glibc. This has a number of limitations, most notably that maintaining "
407 "multiple threads to perform I/O operations is expensive and scales poorly. "
408 "Work has been in progress for some time on a kernel state-machine-based "
409 "implementation of asynchronous I/O (see B<io_submit>(2), B<io_setup>(2), "
410 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2)), but this "
411 "implementation hasn't yet matured to the point where the POSIX AIO "
412 "implementation can be completely reimplemented using the kernel system "
417 #: build/C/man7/aio.7:196 build/C/man3/aio_cancel.3:116 build/C/man3/aio_error.3:89 build/C/man3/aio_read.3:146 build/C/man3/aio_return.3:84
423 #: build/C/man7/aio.7:209
425 "The program below opens each of the files named in its command-line "
426 "arguments and queues a request on the resulting file descriptor using "
427 "B<aio_read>(3). The program then loops, periodically monitoring each of the "
428 "I/O operations that is still in progress using B<aio_error>(3). Each of the "
429 "I/O requests is set up to provide notification by delivery of a signal. "
430 "After all I/O requests have completed, the program retrieves their status "
431 "using B<aio_return>(3)."
435 #: build/C/man7/aio.7:215
437 "The B<SIGQUIT> signal (generated by typing control-\\e) causes the program "
438 "to request cancellation of each of the outstanding requests using "
443 #: build/C/man7/aio.7:220
445 "Here is an example of what we might see when running this program. In this "
446 "example, the program queues two requests to standard input, and these are "
447 "satisfied by two lines of input containing \"abc\" and \"x\"."
451 #: build/C/man7/aio.7:244
454 "$ B<./a.out /dev/stdin /dev/stdin>\n"
455 "opened /dev/stdin on descriptor 3\n"
456 "opened /dev/stdin on descriptor 4\n"
458 " for request 0 (descriptor 3): In progress\n"
459 " for request 1 (descriptor 4): In progress\n"
461 "I/O completion signal received\n"
463 " for request 0 (descriptor 3): I/O succeeded\n"
464 " for request 1 (descriptor 4): In progress\n"
466 " for request 1 (descriptor 4): In progress\n"
468 "I/O completion signal received\n"
470 " for request 1 (descriptor 4): I/O succeeded\n"
471 "All I/O requests completed\n"
473 " for request 0 (descriptor 3): 4\n"
474 " for request 1 (descriptor 4): 2\n"
478 #: build/C/man7/aio.7:246
480 msgid "Program source"
484 #: build/C/man7/aio.7:255
487 "#include E<lt>stdlib.hE<gt>\n"
488 "#include E<lt>unistd.hE<gt>\n"
489 "#include E<lt>stdio.hE<gt>\n"
490 "#include E<lt>errno.hE<gt>\n"
491 "#include E<lt>aio.hE<gt>\n"
492 "#include E<lt>signal.hE<gt>\n"
496 #: build/C/man7/aio.7:257
498 msgid "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
502 #: build/C/man7/aio.7:259
504 msgid "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
508 #: build/C/man7/aio.7:261
510 msgid "#define errMsg(msg) do { perror(msg); } while (0)\n"
514 #: build/C/man7/aio.7:268
517 "struct ioRequest { /* Application-defined structure for tracking\n"
521 " struct aiocb *aiocbp;\n"
526 #: build/C/man7/aio.7:272
529 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
530 " /* On delivery of SIGQUIT, we attempt to\n"
531 " cancel all outstanding I/O requests */\n"
535 #: build/C/man7/aio.7:278
538 "static void /* Handler for SIGQUIT */\n"
539 "quitHandler(int sig)\n"
546 #: build/C/man7/aio.7:280
548 msgid "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
552 #: build/C/man7/aio.7:285
555 "static void /* Handler for I/O completion signal */\n"
556 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
558 " write(STDOUT_FILENO, \"I/O completion signal received\\en\", 31);\n"
562 #: build/C/man7/aio.7:291
565 " /* The corresponding ioRequest structure would be available as\n"
566 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
567 " and the file descriptor would then be available via\n"
568 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
573 #: build/C/man7/aio.7:301
577 "main(int argc, char *argv[])\n"
579 " struct ioRequest *ioList;\n"
580 " struct aiocb *aiocbList;\n"
581 " struct sigaction sa;\n"
583 " int numReqs; /* Total number of queued I/O requests */\n"
584 " int openReqs; /* Number of I/O requests still in progress */\n"
588 #: build/C/man7/aio.7:307
591 " if (argc E<lt> 2) {\n"
592 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> "
593 "E<lt>pathnameE<gt>...\\en\",\n"
595 " exit(EXIT_FAILURE);\n"
600 #: build/C/man7/aio.7:309
602 msgid " numReqs = argc - 1;\n"
606 #: build/C/man7/aio.7:311
608 msgid " /* Allocate our arrays */\n"
612 #: build/C/man7/aio.7:315
615 " ioList = calloc(numReqs, sizeof(struct ioRequest));\n"
616 " if (ioList == NULL)\n"
617 " errExit(\"calloc\");\n"
621 #: build/C/man7/aio.7:319
624 " aiocbList = calloc(numReqs, sizeof(struct aiocb));\n"
625 " if (aiocbList == NULL)\n"
626 " errExit(\"calloc\");\n"
630 #: build/C/man7/aio.7:321
632 msgid " /* Establish handlers for SIGQUIT and the I/O completion signal */\n"
636 #: build/C/man7/aio.7:324
639 " sa.sa_flags = SA_RESTART;\n"
640 " sigemptyset(&sa.sa_mask);\n"
644 #: build/C/man7/aio.7:328
647 " sa.sa_handler = quitHandler;\n"
648 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
649 " errExit(\"sigaction\");\n"
653 #: build/C/man7/aio.7:333
656 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
657 " sa.sa_sigaction = aioSigHandler;\n"
658 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
659 " errExit(\"sigaction\");\n"
663 #: build/C/man7/aio.7:336
666 " /* Open each file specified on the command line, and queue\n"
667 " a read request on the resulting file descriptor */\n"
671 #: build/C/man7/aio.7:341
674 " for (j = 0; j E<lt> numReqs; j++) {\n"
675 " ioList[j].reqNum = j;\n"
676 " ioList[j].status = EINPROGRESS;\n"
677 " ioList[j].aiocbp = &aiocbList[j];\n"
681 #: build/C/man7/aio.7:347
684 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
685 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
686 " errExit(\"open\");\n"
687 " printf(\"opened %s on descriptor %d\\en\", argv[j + 1],\n"
688 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
692 #: build/C/man7/aio.7:351
695 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
696 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
697 " errExit(\"malloc\");\n"
701 #: build/C/man7/aio.7:359
704 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
705 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
706 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
707 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
708 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
709 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
714 #: build/C/man7/aio.7:364
717 " s = aio_read(ioList[j].aiocbp);\n"
719 " errExit(\"aio_read\");\n"
724 #: build/C/man7/aio.7:366
726 msgid " openReqs = numReqs;\n"
730 #: build/C/man7/aio.7:368
732 msgid " /* Loop, monitoring status of I/O requests */\n"
736 #: build/C/man7/aio.7:371
739 " while (openReqs E<gt> 0) {\n"
740 " sleep(3); /* Delay between each monitoring step */\n"
744 #: build/C/man7/aio.7:373
746 msgid " if (gotSIGQUIT) {\n"
750 #: build/C/man7/aio.7:377
753 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
754 " outstanding I/O requests, and display status returned\n"
755 " from the cancellation requests */\n"
759 #: build/C/man7/aio.7:379
761 msgid " printf(\"got SIGQUIT; canceling I/O requests: \\en\");\n"
765 #: build/C/man7/aio.7:396
768 " for (j = 0; j E<lt> numReqs; j++) {\n"
769 " if (ioList[j].status == EINPROGRESS) {\n"
770 " printf(\" Request %d on descriptor %d:\", j,\n"
771 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
772 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
773 " ioList[j].aiocbp);\n"
774 " if (s == AIO_CANCELED)\n"
775 " printf(\"I/O canceled\\en\");\n"
776 " else if (s == AIO_NOTCANCELED)\n"
777 " printf(\"I/O not canceled\\en\");\n"
778 " else if (s == AIO_ALLDONE)\n"
779 " printf(\"I/O all done\\en\");\n"
781 " errMsg(\"aio_cancel\");\n"
787 #: build/C/man7/aio.7:399
795 #: build/C/man7/aio.7:402
798 " /* Check the status of each I/O request that is still\n"
803 #: build/C/man7/aio.7:409
806 " printf(\"aio_error():\\en\");\n"
807 " for (j = 0; j E<lt> numReqs; j++) {\n"
808 " if (ioList[j].status == EINPROGRESS) {\n"
809 " printf(\" for request %d (descriptor %d): \",\n"
810 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
811 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
815 #: build/C/man7/aio.7:424
818 " switch (ioList[j].status) {\n"
820 " printf(\"I/O succeeded\\en\");\n"
822 " case EINPROGRESS:\n"
823 " printf(\"In progress\\en\");\n"
826 " printf(\"Canceled\\en\");\n"
829 " errMsg(\"aio_error\");\n"
835 #: build/C/man7/aio.7:430
838 " if (ioList[j].status != EINPROGRESS)\n"
846 #: build/C/man7/aio.7:432
848 msgid " printf(\"All I/O requests completed\\en\");\n"
852 #: build/C/man7/aio.7:434
854 msgid " /* Check status return of all I/O requests */\n"
858 #: build/C/man7/aio.7:438
861 " printf(\"aio_return():\\en\");\n"
862 " for (j = 0; j E<lt> numReqs; j++) {\n"
867 #: build/C/man7/aio.7:443
870 " s = aio_return(ioList[j].aiocbp);\n"
871 " printf(\" for request %d (descriptor %d): %ld\\en\",\n"
872 " j, ioList[j].aiocbp-E<gt>aio_fildes, (long) s);\n"
877 #: build/C/man7/aio.7:446
880 " exit(EXIT_SUCCESS);\n"
885 #: build/C/man7/aio.7:447 build/C/man3/aio_cancel.3:119 build/C/man3/aio_error.3:92 build/C/man3/aio_fsync.3:105 build/C/man3/aio_init.3:99 build/C/man3/aio_read.3:149 build/C/man3/aio_return.3:87 build/C/man3/aio_suspend.3:129 build/C/man3/aio_write.3:151 build/C/man2/io_cancel.2:94 build/C/man2/io_destroy.2:83 build/C/man2/io_getevents.2:100 build/C/man2/io_setup.2:96 build/C/man2/io_submit.2:98 build/C/man3/lio_listio.3:219
891 #: build/C/man7/aio.7:462
893 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), "
894 "B<io_submit>(2), B<aio_cancel>(3), B<aio_error>(3), B<aio_init>(3), "
895 "B<aio_read>(3), B<aio_return>(3), B<aio_write>(3), B<lio_listio>(3)"
899 #: build/C/man7/aio.7:465
902 "http://www.squid-cache.org\\:/~adrian\\:/Reprint-Pulavarty-OLS2003.pdf> "
907 #: build/C/man7/aio.7:465 build/C/man3/aio_cancel.3:128 build/C/man3/aio_error.3:101 build/C/man3/aio_fsync.3:115 build/C/man3/aio_init.3:101 build/C/man3/aio_read.3:158 build/C/man3/aio_return.3:96 build/C/man3/aio_suspend.3:139 build/C/man3/aio_write.3:160 build/C/man2/io_cancel.2:102 build/C/man2/io_destroy.2:91 build/C/man2/io_getevents.2:110 build/C/man2/io_setup.2:104 build/C/man2/io_submit.2:106 build/C/man3/lio_listio.3:227
913 #: build/C/man7/aio.7:472 build/C/man3/aio_cancel.3:135 build/C/man3/aio_error.3:108 build/C/man3/aio_fsync.3:122 build/C/man3/aio_init.3:108 build/C/man3/aio_read.3:165 build/C/man3/aio_return.3:103 build/C/man3/aio_suspend.3:146 build/C/man3/aio_write.3:167 build/C/man2/io_cancel.2:109 build/C/man2/io_destroy.2:98 build/C/man2/io_getevents.2:117 build/C/man2/io_setup.2:111 build/C/man2/io_submit.2:113 build/C/man3/lio_listio.3:234
915 "This page is part of release 3.54 of the Linux I<man-pages> project. A "
916 "description of the project, and information about reporting bugs, can be "
917 "found at \\%http://www.kernel.org/doc/man-pages/."
921 #: build/C/man3/aio_cancel.3:24
927 #: build/C/man3/aio_cancel.3:24 build/C/man3/aio_fsync.3:24 build/C/man3/aio_read.3:24 build/C/man3/aio_suspend.3:25 build/C/man3/aio_write.3:24 build/C/man3/lio_listio.3:24
933 #: build/C/man3/aio_cancel.3:27
934 msgid "aio_cancel - cancel an outstanding asynchronous I/O request"
938 #: build/C/man3/aio_cancel.3:27 build/C/man3/aio_error.3:27 build/C/man3/aio_fsync.3:27 build/C/man3/aio_init.3:29 build/C/man3/aio_read.3:27 build/C/man3/aio_return.3:27 build/C/man3/aio_suspend.3:28 build/C/man3/aio_write.3:27 build/C/man2/io_cancel.2:10 build/C/man2/io_destroy.2:10 build/C/man2/io_getevents.2:10 build/C/man2/io_setup.2:10 build/C/man2/io_submit.2:10 build/C/man3/lio_listio.3:27
944 #: build/C/man3/aio_cancel.3:29 build/C/man3/aio_error.3:29 build/C/man3/aio_fsync.3:29 build/C/man3/aio_read.3:29 build/C/man3/aio_return.3:29 build/C/man3/aio_write.3:29
945 msgid "B<#include E<lt>aio.hE<gt>>"
949 #: build/C/man3/aio_cancel.3:31
950 msgid "B<int aio_cancel(int >I<fd>B<, struct aiocb *>I<aiocbp>B<);>"
954 #: build/C/man3/aio_cancel.3:33 build/C/man3/aio_error.3:33 build/C/man3/aio_fsync.3:33 build/C/man3/aio_init.3:38 build/C/man3/aio_read.3:33 build/C/man3/aio_return.3:33 build/C/man3/aio_write.3:33
955 msgid "Link with I<-lrt>."
959 #: build/C/man3/aio_cancel.3:51
961 "The B<aio_cancel>() function attempts to cancel outstanding asynchronous "
962 "I/O requests for the file descriptor I<fd>. If I<aiocbp> is NULL, all such "
963 "requests are canceled. Otherwise, only the request described by the control "
964 "block pointed to by I<aiocbp> is canceled. (See B<aio>(7) for a "
965 "description of the I<aiocb> structure.)"
969 #: build/C/man3/aio_cancel.3:63
971 "Normal asynchronous notification occurs for canceled requests (see B<aio>(7) "
972 "and B<sigevent>(7)). The request return status (B<aio_return>(3)) is set "
973 "to -1, and the request error status (B<aio_error>(3)) is set to "
974 "B<ECANCELED>. The control block of requests that cannot be canceled is not "
979 #: build/C/man3/aio_cancel.3:70
981 "If the request could not be canceled, then it will terminate in the usual "
982 "way after performing the I/O operation. (In this case, B<aio_error>(3) "
983 "will return the status B<EINPROGRESSS>.)"
987 #: build/C/man3/aio_cancel.3:77
989 "If I<aiocbp> is not NULL, and I<fd> differs from the file descriptor with "
990 "which the asynchronous operation was initiated, unspecified results occur."
993 #. FreeBSD: not those on raw disk devices.
995 #: build/C/man3/aio_cancel.3:80
996 msgid "Which operations are cancelable is implementation-defined."
1000 #: build/C/man3/aio_cancel.3:80 build/C/man3/aio_error.3:44 build/C/man3/aio_fsync.3:73 build/C/man3/aio_read.3:88 build/C/man3/aio_return.3:49 build/C/man3/aio_suspend.3:80 build/C/man3/aio_write.3:95 build/C/man2/io_cancel.2:37 build/C/man2/io_destroy.2:29 build/C/man2/io_getevents.2:34 build/C/man2/io_setup.2:32 build/C/man2/io_submit.2:31 build/C/man3/lio_listio.3:108
1002 msgid "RETURN VALUE"
1006 #: build/C/man3/aio_cancel.3:84
1007 msgid "The B<aio_cancel>() function returns one of the following values:"
1011 #: build/C/man3/aio_cancel.3:84
1013 msgid "B<AIO_CANCELED>"
1017 #: build/C/man3/aio_cancel.3:87
1018 msgid "All requests were successfully canceled."
1022 #: build/C/man3/aio_cancel.3:87
1024 msgid "B<AIO_NOTCANCELED>"
1028 #: build/C/man3/aio_cancel.3:93
1030 "At least one of the requests specified was not canceled because it was in "
1031 "progress. In this case, one may check the status of individual requests "
1032 "using B<aio_error>(3)."
1036 #: build/C/man3/aio_cancel.3:93
1038 msgid "B<AIO_ALLDONE>"
1042 #: build/C/man3/aio_cancel.3:96
1043 msgid "All requests had already been completed before the call."
1047 #: build/C/man3/aio_cancel.3:96
1053 #: build/C/man3/aio_cancel.3:101
1055 "An error occurred. The cause of the error can be found by inspecting "
1060 #: build/C/man3/aio_cancel.3:102 build/C/man3/aio_fsync.3:83 build/C/man3/aio_read.3:107 build/C/man3/aio_write.3:114 build/C/man2/io_submit.2:41
1066 #: build/C/man3/aio_cancel.3:106
1067 msgid "I<fd> is not a valid file descriptor."
1071 #: build/C/man3/aio_cancel.3:106 build/C/man3/aio_error.3:74 build/C/man3/aio_fsync.3:95 build/C/man3/aio_read.3:119 build/C/man3/aio_return.3:69 build/C/man3/aio_suspend.3:99 build/C/man3/aio_write.3:129 build/C/man2/io_cancel.2:52 build/C/man2/io_destroy.2:41 build/C/man2/io_getevents.2:53 build/C/man2/io_setup.2:54 build/C/man2/io_submit.2:56
1077 #: build/C/man3/aio_cancel.3:110
1078 msgid "B<aio_cancel>() is not implemented."
1082 #: build/C/man3/aio_cancel.3:114
1083 msgid "The B<aio_cancel>() function is available since glibc 2.1."
1087 #: build/C/man3/aio_cancel.3:119 build/C/man3/aio_error.3:92 build/C/man3/aio_read.3:149 build/C/man3/aio_return.3:87
1088 msgid "See B<aio>(7)."
1092 #: build/C/man3/aio_cancel.3:128
1094 "B<aio_error>(3), B<aio_fsync>(3), B<aio_read>(3), B<aio_return>(3), "
1095 "B<aio_suspend>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7)"
1099 #: build/C/man3/aio_error.3:24
1105 #: build/C/man3/aio_error.3:24 build/C/man3/aio_return.3:24
1111 #: build/C/man3/aio_error.3:27
1112 msgid "aio_error - get error status of asynchronous I/O operation"
1116 #: build/C/man3/aio_error.3:31
1117 msgid "B<int aio_error(const struct aiocb *>I<aiocbp>B<);>"
1121 #: build/C/man3/aio_error.3:44
1123 "The B<aio_error>() function returns the error status for the asynchronous "
1124 "I/O request with control block pointed to by I<aiocbp>. (See B<aio>(7) for "
1125 "a description of the I<aiocb> structure.)"
1129 #: build/C/man3/aio_error.3:46
1130 msgid "This function returns one of the following:"
1134 #: build/C/man3/aio_error.3:46 build/C/man3/aio_error.3:50 build/C/man3/aio_error.3:53 build/C/man3/aio_error.3:55 build/C/man3/aio_suspend.3:43 build/C/man3/aio_suspend.3:47 build/C/man3/aio_suspend.3:49
1140 #: build/C/man3/aio_error.3:50
1141 msgid "B<EINPROGRESS>, if the request has not been completed yet."
1145 #: build/C/man3/aio_error.3:53
1146 msgid "B<ECANCELED>, if the request was canceled."
1150 #: build/C/man3/aio_error.3:55
1151 msgid "0, if the request completed successfully."
1155 #: build/C/man3/aio_error.3:66
1157 "A positive error number, if the asynchronous I/O operation failed. This is "
1158 "the same value that would have been stored in the I<errno> variable in the "
1159 "case of a synchronous B<read>(2), B<write>(2), B<fsync>(2), or "
1160 "B<fdatasync>(2) call."
1164 #: build/C/man3/aio_error.3:74
1166 "I<aiocbp> does not point at a control block for an asynchronous I/O request "
1167 "of which the return status (see B<aio_return>(3)) has not been retrieved "
1172 #: build/C/man3/aio_error.3:78
1173 msgid "B<aio_error>() is not implemented."
1177 #: build/C/man3/aio_error.3:82
1178 msgid "The B<aio_error>() function is available since glibc 2.1."
1182 #: build/C/man3/aio_error.3:82 build/C/man3/aio_return.3:77
1188 #: build/C/man3/aio_error.3:83 build/C/man3/aio_return.3:78
1190 msgid "Multithreading (see pthreads(7))"
1194 #: build/C/man3/aio_error.3:87
1195 msgid "The B<aio_error>() function is thread-safe."
1199 #: build/C/man3/aio_error.3:101
1201 "B<aio_cancel>(3), B<aio_fsync>(3), B<aio_read>(3), B<aio_return>(3), "
1202 "B<aio_suspend>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7)"
1206 #: build/C/man3/aio_fsync.3:24
1212 #: build/C/man3/aio_fsync.3:27
1213 msgid "aio_fsync - asynchronous file synchronization"
1217 #: build/C/man3/aio_fsync.3:31
1218 msgid "B<int aio_fsync(int >I<op>B<, struct aiocb *>I<aiocbp>B<);>"
1222 #: build/C/man3/aio_fsync.3:44
1224 "The B<aio_fsync>() function does a sync on all outstanding asynchronous I/O "
1225 "operations associated with I<aiocbp-E<gt>aio_fildes>. (See B<aio>(7) for a "
1226 "description of the I<aiocb> structure.)"
1230 #: build/C/man3/aio_fsync.3:58
1232 "More precisely, if I<op> is B<O_SYNC>, then all currently queued I/O "
1233 "operations shall be completed as if by a call of B<fsync>(2), and if I<op> "
1234 "is B<O_DSYNC>, this call is the asynchronous analog of B<fdatasync>(2)."
1238 #: build/C/man3/aio_fsync.3:60
1239 msgid "Note that this is a request only; it does not wait for I/O completion."
1243 #: build/C/man3/aio_fsync.3:73
1245 "Apart from I<aio_fildes>, the only field in the structure pointed to by "
1246 "I<aiocbp> that is used by this call is the I<aio_sigevent> field (a "
1247 "I<sigevent> structure, described in B<sigevent>(7)), which indicates the "
1248 "desired type of asynchronous notification at completion. All other fields "
1253 #: build/C/man3/aio_fsync.3:79
1255 "On success (the sync request was successfully queued) this function returns "
1256 "0. On error -1 is returned, and I<errno> is set appropriately."
1260 #: build/C/man3/aio_fsync.3:80 build/C/man3/aio_read.3:104 build/C/man3/aio_suspend.3:89 build/C/man3/aio_write.3:111 build/C/man2/io_cancel.2:43 build/C/man2/io_setup.2:38 build/C/man2/io_submit.2:38 build/C/man3/lio_listio.3:150 build/C/man3/lio_listio.3:153
1266 #: build/C/man3/aio_fsync.3:83 build/C/man3/aio_read.3:107 build/C/man3/aio_write.3:114 build/C/man3/lio_listio.3:153
1267 msgid "Out of resources."
1271 #: build/C/man3/aio_fsync.3:87 build/C/man3/aio_write.3:118
1272 msgid "I<aio_fildes> is not a valid file descriptor open for writing."
1276 #: build/C/man3/aio_fsync.3:95
1278 "Synchronized I/O is not supported for this file, or I<op> is not B<O_SYNC> "
1283 #: build/C/man3/aio_fsync.3:99
1284 msgid "B<aio_fsync>() is not implemented."
1288 #: build/C/man3/aio_fsync.3:103
1289 msgid "The B<aio_fsync>() function is available since glibc 2.1."
1293 #: build/C/man3/aio_fsync.3:115
1295 "B<aio_cancel>(3), B<aio_error>(3), B<aio_read>(3), B<aio_return>(3), "
1296 "B<aio_suspend>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7), "
1301 #: build/C/man3/aio_init.3:26
1307 #: build/C/man3/aio_init.3:26
1313 #: build/C/man3/aio_init.3:29
1314 msgid "aio_init - asynchronous I/O initialization"
1318 #: build/C/man3/aio_init.3:33
1321 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
1322 "B<#include E<lt>aio.hE<gt>>\n"
1326 #: build/C/man3/aio_init.3:35
1328 msgid "B<void aio_init(const struct aioinit *>I<init>B<);>\n"
1332 #: build/C/man3/aio_init.3:45
1334 "The GNU-specific B<aio_init>() function allows the caller to provide tuning "
1335 "hints to the glibc POSIX AIO implementation. Use of this function is "
1336 "optional, but to be effective, it must be called before employing any other "
1337 "functions in the POSIX AIO API."
1341 #: build/C/man3/aio_init.3:49
1343 "The tuning information is provided in the buffer pointed to by the argument "
1344 "I<init>. This buffer is a structure of the following form:"
1348 #: build/C/man3/aio_init.3:64
1351 "struct aioinit {\n"
1352 " int aio_threads; /* Maximum number of threads */\n"
1353 " int aio_num; /* Number of expected simultaneous\n"
1355 " int aio_locks; /* Not used */\n"
1356 " int aio_usedba; /* Not used */\n"
1357 " int aio_debug; /* Not used */\n"
1358 " int aio_numusers; /* Not used */\n"
1359 " int aio_idle_time; /* Number of seconds before idle thread\n"
1360 " terminates (since glibc 2.2) */\n"
1361 " int aio_reserved;\n"
1366 #: build/C/man3/aio_init.3:70
1367 msgid "The following fields are used in the I<aioinit> structure:"
1371 #: build/C/man3/aio_init.3:70
1373 msgid "I<aio_threads>"
1377 #: build/C/man3/aio_init.3:78
1379 "This field specifies the maximum number of worker threads that may be used "
1380 "by the implementation. If the number of outstanding I/O operations exceeds "
1381 "this limit, then excess operations will be queued until a worker thread "
1382 "becomes free. If this field is specified with a value less than 1, the "
1383 "value 1 is used. The default value is 20."
1387 #: build/C/man3/aio_init.3:78
1392 #. FIXME But, if aio_num > 32, the behavior looks strange. See
1393 #. http://sourceware.org/bugzilla/show_bug.cgi?id=12083
1395 #: build/C/man3/aio_init.3:87
1397 "This field should specify the maximum number of simultaneous I/O requests "
1398 "that the caller expects to enqueue. If a value less than 32 is specified "
1399 "for this field, it is rounded up to 32. The default value is 64."
1403 #: build/C/man3/aio_init.3:87
1405 msgid "I<aio_idle_time>"
1409 #: build/C/man3/aio_init.3:93
1411 "This field specifies the amount of time in seconds that a worker thread "
1412 "should wait for further requests before terminating, after having completed "
1413 "a previous request. The default value is 1."
1417 #: build/C/man3/aio_init.3:97
1418 msgid "The B<aio_init>() function is available since glibc 2.1."
1422 #: build/C/man3/aio_init.3:99
1423 msgid "This function is a GNU extension."
1427 #: build/C/man3/aio_init.3:101
1432 #: build/C/man3/aio_read.3:24
1438 #: build/C/man3/aio_read.3:27
1439 msgid "aio_read - asynchronous read"
1443 #: build/C/man3/aio_read.3:31
1444 msgid "B<int aio_read(struct aiocb *>I<aiocbp>B<);>"
1448 #: build/C/man3/aio_read.3:41
1450 "The B<aio_read>() function queues the I/O request described by the buffer "
1451 "pointed to by I<aiocbp>. This function is the asynchronous analog of "
1452 "B<read>(2). The arguments of the call"
1456 #: build/C/man3/aio_read.3:43
1458 msgid " read(fd, buf, count)\n"
1462 #: build/C/man3/aio_read.3:56 build/C/man3/aio_write.3:56
1464 "correspond (in order) to the fields I<aio_fildes>, I<aio_buf>, and "
1465 "I<aio_nbytes> of the structure pointed to by I<aiocbp>. (See B<aio>(7) for "
1466 "a description of the I<aiocb> structure.)"
1470 #: build/C/man3/aio_read.3:62
1472 "The data is read starting at the absolute file offset "
1473 "I<aiocbp-E<gt>aio_offset>, regardless of the current file offset. After the "
1474 "call, the value of the current file offset is unspecified."
1478 #: build/C/man3/aio_read.3:75
1480 "The \"asynchronous\" means that this call returns as soon as the request has "
1481 "been enqueued; the read may or may not have completed when the call "
1482 "returns. One tests for completion using B<aio_error>(3). The return status "
1483 "of a completed I/O operation can be obtained by B<aio_return>(3). "
1484 "Asynchronous notification of I/O completion can be obtained by setting "
1485 "I<aiocbp-E<gt>aio_sigevent> appropriately; see B<sigevent>(7) for details."
1489 #: build/C/man3/aio_read.3:82 build/C/man3/aio_write.3:89
1491 "If B<_POSIX_PRIORITIZED_IO> is defined, and this file supports it, then the "
1492 "asynchronous operation is submitted at a priority equal to that of the "
1493 "calling process minus I<aiocbp-E<gt>aio_reqprio>."
1497 #: build/C/man3/aio_read.3:86 build/C/man3/aio_write.3:93
1498 msgid "The field I<aiocbp-E<gt>aio_lio_opcode> is ignored."
1502 #: build/C/man3/aio_read.3:88
1503 msgid "No data is read from a regular file beyond its maximum offset."
1507 #: build/C/man3/aio_read.3:103 build/C/man3/aio_write.3:110
1509 "On success, 0 is returned. On error the request is not enqueued, -1 is "
1510 "returned, and I<errno> is set appropriately. If an error is detected only "
1511 "later, it will be reported via B<aio_return>(3) (returns status -1) and "
1512 "B<aio_error>(3) (error status\\(emwhatever one would have gotten in "
1513 "I<errno>, such as B<EBADF>)."
1517 #: build/C/man3/aio_read.3:111
1518 msgid "I<aio_fildes> is not a valid file descriptor open for reading."
1522 #: build/C/man3/aio_read.3:119
1523 msgid "One or more of I<aio_offset>, I<aio_reqprio>, or I<aio_nbytes> are invalid."
1527 #: build/C/man3/aio_read.3:123
1528 msgid "B<aio_read>() is not implemented."
1532 #: build/C/man3/aio_read.3:123
1534 msgid "B<EOVERFLOW>"
1538 #: build/C/man3/aio_read.3:128
1540 "The file is a regular file, we start reading before end-of-file and want at "
1541 "least one byte, but the starting position is past the maximum offset for "
1546 #: build/C/man3/aio_read.3:132
1547 msgid "The B<aio_read>() function is available since glibc 2.1."
1550 #. or the control block of the operation
1552 #: build/C/man3/aio_read.3:142
1554 "It is a good idea to zero out the control block before use. The control "
1555 "block must not be changed while the read operation is in progress. The "
1556 "buffer area being read into must not be accessed during the operation or "
1557 "undefined results may occur. The memory areas involved must remain valid."
1561 #: build/C/man3/aio_read.3:146 build/C/man3/aio_write.3:151 build/C/man3/lio_listio.3:219
1563 "Simultaneous I/O operations specifying the same I<aiocb> structure produce "
1564 "undefined results."
1568 #: build/C/man3/aio_read.3:158
1570 "B<aio_cancel>(3), B<aio_error>(3), B<aio_fsync>(3), B<aio_return>(3), "
1571 "B<aio_suspend>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7)"
1575 #: build/C/man3/aio_return.3:24
1581 #: build/C/man3/aio_return.3:27
1582 msgid "aio_return - get return status of asynchronous I/O operation"
1586 #: build/C/man3/aio_return.3:31
1587 msgid "B<ssize_t aio_return(struct aiocb *>I<aiocbp>B<);>"
1591 #: build/C/man3/aio_return.3:44
1593 "The B<aio_return>() function returns the final return status for the "
1594 "asynchronous I/O request with control block pointed to by I<aiocbp>. (See "
1595 "B<aio>(7) for a description of the I<aiocb> structure.)"
1599 #: build/C/man3/aio_return.3:49
1601 "This function should be called only once for any given request, after "
1602 "B<aio_error>(3) returns something other than B<EINPROGRESS>."
1606 #: build/C/man3/aio_return.3:58
1608 "If the asynchronous I/O operation has completed, this function returns the "
1609 "value that would have been returned in case of a synchronous B<read>(2), "
1610 "B<write>(2), B<fsync>(2) or B<fdatasync>(2), call."
1614 #: build/C/man3/aio_return.3:63
1616 "If the asynchronous I/O operation has not yet completed, the return value "
1617 "and effect of B<aio_return>() are undefined."
1621 #: build/C/man3/aio_return.3:69
1623 "I<aiocbp> does not point at a control block for an asynchronous I/O request "
1624 "of which the return status has not been retrieved yet."
1628 #: build/C/man3/aio_return.3:73
1629 msgid "B<aio_return>() is not implemented."
1633 #: build/C/man3/aio_return.3:77
1634 msgid "The B<aio_return>() function is available since glibc 2.1."
1638 #: build/C/man3/aio_return.3:82
1639 msgid "The B<aio_return>() function is thread-safe."
1643 #: build/C/man3/aio_return.3:96
1645 "B<aio_cancel>(3), B<aio_error>(3), B<aio_fsync>(3), B<aio_read>(3), "
1646 "B<aio_suspend>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7)"
1650 #: build/C/man3/aio_suspend.3:25
1656 #: build/C/man3/aio_suspend.3:28
1657 msgid "aio_suspend - wait for asynchronous I/O operation or timeout"
1661 #: build/C/man3/aio_suspend.3:32 build/C/man3/lio_listio.3:30
1663 msgid "B<#include E<lt>aio.hE<gt>>\n"
1667 #: build/C/man3/aio_suspend.3:34
1669 msgid "B<int aio_suspend(const struct aiocb * const >I<aiocb_list>B<[],>\n"
1673 #: build/C/man3/aio_suspend.3:36
1676 "B< int >I<nitems>B<, const struct timespec "
1677 "*>I<timeout>B<);>\n"
1681 #: build/C/man3/aio_suspend.3:38 build/C/man3/lio_listio.3:35
1683 msgid "Link with I<-lrt>.\n"
1687 #: build/C/man3/aio_suspend.3:43
1689 "The B<aio_suspend>() function suspends the calling thread until one of the "
1694 #: build/C/man3/aio_suspend.3:47
1696 "One or more of the asynchronous I/O requests in the list I<aiocb_list> has "
1701 #: build/C/man3/aio_suspend.3:49
1702 msgid "A signal is delivered."
1706 #: build/C/man3/aio_suspend.3:56
1708 "I<timeout> is not NULL and the specified time interval has passed. (For "
1709 "details of the I<timespec> structure, see B<nanosleep>(2).)"
1713 #: build/C/man3/aio_suspend.3:74
1715 "The I<nitems> argument specifies the number of items in I<aiocb_list>. Each "
1716 "item in the list pointed to by I<aiocb_list> must be either NULL (and then "
1717 "is ignored), or a pointer to a control block on which I/O was initiated "
1718 "using B<aio_read>(3), B<aio_write>(3), or B<lio_listio>(3). (See B<aio>(7) "
1719 "for a description of the I<aiocb> structure.)"
1723 #: build/C/man3/aio_suspend.3:80
1725 "If B<CLOCK_MONOTONIC> is supported, this clock is used to measure the "
1726 "timeout interval (see B<clock_gettime>(3))."
1730 #: build/C/man3/aio_suspend.3:88
1732 "If this function returns after completion of one of the I/O requests "
1733 "specified in I<aiocb_list>, 0 is returned. Otherwise, -1 is returned, and "
1734 "I<errno> is set to indicate the error."
1738 #: build/C/man3/aio_suspend.3:93
1739 msgid "The call timed out before any of the indicated operations had completed."
1743 #: build/C/man3/aio_suspend.3:93 build/C/man2/io_getevents.2:49 build/C/man3/lio_listio.3:169
1749 #: build/C/man3/aio_suspend.3:99
1751 "The call was ended by signal (possibly the completion signal of one of the "
1752 "operations we were waiting for); see B<signal>(7)."
1756 #: build/C/man3/aio_suspend.3:103
1757 msgid "B<aio_suspend>() is not implemented."
1761 #: build/C/man3/aio_suspend.3:107
1762 msgid "The B<aio_suspend>() function is available since glibc 2.1."
1766 #: build/C/man3/aio_suspend.3:113
1768 "One can achieve polling by using a non-NULL I<timeout> that specifies a zero "
1773 #: build/C/man3/aio_suspend.3:119
1775 "If one or more of the asynchronous I/O operations specified in I<aiocb_list> "
1776 "has already completed at the time of the call to B<aio_suspend>(), then the "
1777 "call returns immediately."
1781 #: build/C/man3/aio_suspend.3:129
1783 "To determine which I/O operations have completed after a successful return "
1784 "from B<aio_suspend>(), use B<aio_error>(3) to scan the list of I<aiocb> "
1785 "structures pointed to by I<aiocb_list>."
1789 #: build/C/man3/aio_suspend.3:139
1791 "B<aio_cancel>(3), B<aio_error>(3), B<aio_fsync>(3), B<aio_read>(3), "
1792 "B<aio_return>(3), B<aio_write>(3), B<lio_listio>(3), B<aio>(7), B<time>(7)"
1796 #: build/C/man3/aio_write.3:24
1802 #: build/C/man3/aio_write.3:27
1803 msgid "aio_write - asynchronous write"
1807 #: build/C/man3/aio_write.3:31
1808 msgid "B<int aio_write(struct aiocb *>I<aiocbp>B<);>"
1812 #: build/C/man3/aio_write.3:41
1814 "The B<aio_write>() function queues the I/O request described by the buffer "
1815 "pointed to by I<aiocbp>. This function is the asynchronous analog of "
1816 "B<write>(2). The arguments of the call"
1820 #: build/C/man3/aio_write.3:43
1822 msgid " write(fd, buf, count)\n"
1826 #: build/C/man3/aio_write.3:69
1828 "If B<O_APPEND> is not set, the data is written starting at the absolute file "
1829 "offset I<aiocbp-E<gt>aio_offset>, regardless of the current file offset. If "
1830 "B<O_APPEND> is set, data is written at the end of the file in the same order "
1831 "as B<aio_write>() calls are made. After the call, the value of the current "
1832 "file offset is unspecified."
1836 #: build/C/man3/aio_write.3:82
1838 "The \"asynchronous\" means that this call returns as soon as the request has "
1839 "been enqueued; the write may or may not have completed when the call "
1840 "returns. One tests for completion using B<aio_error>(3). The return status "
1841 "of a completed I/O operation can be obtained B<aio_return>(3). Asynchronous "
1842 "notification of I/O completion can be obtained by setting "
1843 "I<aiocbp-E<gt>aio_sigevent> appropriately; see B<sigevent>(7) for details."
1847 #: build/C/man3/aio_write.3:95
1848 msgid "No data is written to a regular file beyond its maximum offset."
1852 #: build/C/man3/aio_write.3:118
1858 #: build/C/man3/aio_write.3:122
1860 "The file is a regular file, we want to write at least one byte, but the "
1861 "starting position is at or beyond the maximum offset for this file."
1865 #: build/C/man3/aio_write.3:129
1866 msgid "One or more of I<aio_offset>, I<aio_reqprio>, I<aio_nbytes> are invalid."
1870 #: build/C/man3/aio_write.3:133
1871 msgid "B<aio_write>() is not implemented."
1875 #: build/C/man3/aio_write.3:137
1876 msgid "The B<aio_write>() function is available since glibc 2.1."
1879 #. or the control block of the operation
1881 #: build/C/man3/aio_write.3:147
1883 "It is a good idea to zero out the control block before use. The control "
1884 "block must not be changed while the write operation is in progress. The "
1885 "buffer area being written out must not be accessed during the operation or "
1886 "undefined results may occur. The memory areas involved must remain valid."
1890 #: build/C/man3/aio_write.3:160
1892 "B<aio_cancel>(3), B<aio_error>(3), B<aio_fsync>(3), B<aio_read>(3), "
1893 "B<aio_return>(3), B<aio_suspend>(3), B<lio_listio>(3), B<aio>(7)"
1897 #: build/C/man2/io_cancel.2:7
1903 #: build/C/man2/io_cancel.2:7
1909 #: build/C/man2/io_cancel.2:10
1910 msgid "io_cancel - cancel an outstanding asynchronous I/O operation"
1914 #: build/C/man2/io_cancel.2:13 build/C/man2/io_destroy.2:13 build/C/man2/io_setup.2:13 build/C/man2/io_submit.2:13
1916 msgid "B<#include E<lt>linux/aio_abi.hE<gt>> /* Defines needed types */\n"
1920 #: build/C/man2/io_cancel.2:16
1923 "B<int io_cancel(aio_context_t >I<ctx_id>B<, struct iocb *>I<iocb>B<,>\n"
1924 "B< struct io_event *>I<result>B<);>\n"
1928 #: build/C/man2/io_cancel.2:20 build/C/man2/io_destroy.2:19 build/C/man2/io_getevents.2:22 build/C/man2/io_setup.2:19 build/C/man2/io_submit.2:20
1929 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
1933 #: build/C/man2/io_cancel.2:37
1935 "The B<io_cancel>() system call attempts to cancel an asynchronous I/O "
1936 "operation previously submitted with B<io_submit>(2). The I<iocb> argument "
1937 "describes the operation to be canceled and the I<ctx_id> argument is the AIO "
1938 "context to which the operation was submitted. If the operation is "
1939 "successfully canceled, the event will be copied into the memory pointed to "
1940 "by I<result> without being placed into the completion queue."
1944 #: build/C/man2/io_cancel.2:42
1945 msgid "On success, B<io_cancel>() returns 0. For the failure return, see NOTES."
1949 #: build/C/man2/io_cancel.2:46
1950 msgid "The I<iocb> specified was not canceled."
1954 #: build/C/man2/io_cancel.2:46 build/C/man2/io_destroy.2:35 build/C/man2/io_getevents.2:41 build/C/man2/io_setup.2:43 build/C/man2/io_submit.2:44
1960 #: build/C/man2/io_cancel.2:49 build/C/man2/io_submit.2:47
1961 msgid "One of the data structures points to invalid data."
1965 #: build/C/man2/io_cancel.2:52 build/C/man2/io_destroy.2:41
1966 msgid "The AIO context specified by I<ctx_id> is invalid."
1970 #: build/C/man2/io_cancel.2:56
1971 msgid "B<io_cancel>() is not implemented on this architecture."
1975 #: build/C/man2/io_cancel.2:59 build/C/man2/io_destroy.2:48 build/C/man2/io_getevents.2:60 build/C/man2/io_setup.2:61 build/C/man2/io_submit.2:63
1976 msgid "The asynchronous I/O system calls first appeared in Linux 2.5."
1980 #: build/C/man2/io_cancel.2:64
1982 "B<io_cancel>() is Linux-specific and should not be used in programs that "
1983 "are intended to be portable."
1986 #. http://git.fedorahosted.org/git/?p=libaio.git
1988 #: build/C/man2/io_cancel.2:73
1990 "Glibc does not provide a wrapper function for this system call. You could "
1991 "invoke it using B<syscall>(2). But instead, you probably want to use the "
1992 "B<io_cancel>() wrapper function provided by I<libaio>."
1995 #. But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
1998 #: build/C/man2/io_cancel.2:94 build/C/man2/io_destroy.2:83 build/C/man2/io_getevents.2:95 build/C/man2/io_submit.2:98
2000 "Note that the I<libaio> wrapper function uses a different type "
2001 "(I<io_context_t>) for the I<ctx_id> argument. Note also that the I<libaio> "
2002 "wrapper does not follow the usual C library conventions for indicating "
2003 "errors: on error it returns a negated error number (the negative of one of "
2004 "the values listed in ERRORS). If the system call is invoked via "
2005 "B<syscall>(2), then the return value follows the usual conventions for "
2006 "indicating an error: -1, with I<errno> set to a (positive) value that "
2007 "indicates the error."
2013 #: build/C/man2/io_cancel.2:102
2015 "B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), B<io_submit>(2), "
2020 #: build/C/man2/io_destroy.2:7
2026 #: build/C/man2/io_destroy.2:7 build/C/man2/io_getevents.2:7
2032 #: build/C/man2/io_destroy.2:10
2033 msgid "io_destroy - destroy an asynchronous I/O context"
2037 #: build/C/man2/io_destroy.2:15
2039 msgid "B<int io_destroy(aio_context_t >I<ctx_id>B<);>\n"
2043 #: build/C/man2/io_destroy.2:29
2045 "The B<io_destroy>() system call will attempt to cancel all outstanding "
2046 "asynchronous I/O operations against I<ctx_id>, will block on the completion "
2047 "of all operations that could not be canceled, and will destroy the "
2052 #: build/C/man2/io_destroy.2:34
2053 msgid "On success, B<io_destroy>() returns 0. For the failure return, see NOTES."
2057 #: build/C/man2/io_destroy.2:38
2058 msgid "The context pointed to is invalid."
2062 #: build/C/man2/io_destroy.2:45
2063 msgid "B<io_destroy>() is not implemented on this architecture."
2067 #: build/C/man2/io_destroy.2:53
2069 "B<io_destroy>() is Linux-specific and should not be used in programs that "
2070 "are intended to be portable."
2073 #. http://git.fedorahosted.org/git/?p=libaio.git
2075 #: build/C/man2/io_destroy.2:62
2077 "Glibc does not provide a wrapper function for this system call. You could "
2078 "invoke it using B<syscall>(2). But instead, you probably want to use the "
2079 "B<io_destroy>() wrapper function provided by I<libaio>."
2085 #: build/C/man2/io_destroy.2:91
2087 "B<io_cancel>(2), B<io_getevents>(2), B<io_setup>(2), B<io_submit>(2), "
2092 #: build/C/man2/io_getevents.2:7
2094 msgid "IO_GETEVENTS"
2098 #: build/C/man2/io_getevents.2:10
2099 msgid "io_getevents - read asynchronous I/O events from the completion queue"
2103 #: build/C/man2/io_getevents.2:14
2106 "B<#include E<lt>linux/aio_abi.hE<gt>> /* Defines needed types */\n"
2107 "B<#include E<lt>linux/time.hE<gt>> /* Defines 'struct timespec' "
2112 #: build/C/man2/io_getevents.2:18
2115 "B<int io_getevents(aio_context_t >I<ctx_id>B<, long >I<min_nr>B<, long "
2117 "B< struct io_event *>I<events>B<, struct timespec "
2118 "*>I<timeout>B<);>\n"
2122 #: build/C/man2/io_getevents.2:34
2124 "The B<io_getevents>() system call attempts to read at least I<min_nr> "
2125 "events and up to I<nr> events from the completion queue of the AIO context "
2126 "specified by I<ctx_id>. The I<timeout> argument specifies the amount of "
2127 "time to wait for events, where a NULL timeout waits until at least I<min_nr> "
2128 "events have been seen. Note that I<timeout> is relative."
2132 #: build/C/man2/io_getevents.2:40
2134 "On success, B<io_getevents>() returns the number of events read: 0 if no "
2135 "events are available, or less than I<min_nr> if the I<timeout> has elapsed. "
2136 "For the failure return, see NOTES."
2140 #: build/C/man2/io_getevents.2:44
2141 msgid "Either I<events> or I<timeout> is an invalid pointer."
2145 #: build/C/man2/io_getevents.2:49
2146 msgid "I<ctx_id> is invalid. I<min_nr> is out of range or I<nr> is out of range."
2150 #: build/C/man2/io_getevents.2:53
2151 msgid "Interrupted by a signal handler; see B<signal>(7)."
2155 #: build/C/man2/io_getevents.2:57
2156 msgid "B<io_getevents>() is not implemented on this architecture."
2160 #: build/C/man2/io_getevents.2:65
2162 "B<io_getevents>() is Linux-specific and should not be used in programs that "
2163 "are intended to be portable."
2166 #. http://git.fedorahosted.org/git/?p=libaio.git
2168 #: build/C/man2/io_getevents.2:74
2170 "Glibc does not provide a wrapper function for this system call. You could "
2171 "invoke it using B<syscall>(2). But instead, you probably want to use the "
2172 "B<io_getevents>() wrapper function provided by I<libaio>."
2176 #: build/C/man2/io_getevents.2:95
2182 #: build/C/man2/io_getevents.2:100
2184 "An invalid I<ctx_id> may cause a segmentation fault instead of genenerating "
2185 "the error B<EINVAL>."
2191 #: build/C/man2/io_getevents.2:110
2193 "B<io_cancel>(2), B<io_destroy>(2), B<io_setup>(2), B<io_submit>(2), "
2194 "B<aio>(7), B<time>(7)"
2198 #: build/C/man2/io_setup.2:7
2204 #: build/C/man2/io_setup.2:7
2210 #: build/C/man2/io_setup.2:10
2211 msgid "io_setup - create an asynchronous I/O context"
2215 #: build/C/man2/io_setup.2:15
2217 msgid "B<int io_setup(unsigned >I<nr_events>B<, aio_context_t *>I<ctx_idp>B<);>\n"
2221 #: build/C/man2/io_setup.2:32
2223 "The B<io_setup>() system call creates an asynchronous I/O context suitable "
2224 "for concurrently processing I<nr_events> operations. The I<ctx_idp> "
2225 "argument must not point to an AIO context that already exists, and must be "
2226 "initialized to 0 prior to the call. On successful creation of the AIO "
2227 "context, I<*ctx_idp> is filled in with the resulting handle."
2231 #: build/C/man2/io_setup.2:37
2232 msgid "On success, B<io_setup>() returns 0. For the failure return, see NOTES."
2236 #: build/C/man2/io_setup.2:43
2238 "The specified I<nr_events> exceeds the user's limit of available events, as "
2239 "defined in I</proc/sys/fs/aio-max-nr>."
2243 #: build/C/man2/io_setup.2:46
2244 msgid "An invalid pointer is passed for I<ctx_idp>."
2248 #: build/C/man2/io_setup.2:51
2250 "I<ctx_idp> is not initialized, or the specified I<nr_events> exceeds "
2251 "internal limits. I<nr_events> should be greater than 0."
2255 #: build/C/man2/io_setup.2:51
2261 #: build/C/man2/io_setup.2:54
2262 msgid "Insufficient kernel resources are available."
2266 #: build/C/man2/io_setup.2:58
2267 msgid "B<io_setup>() is not implemented on this architecture."
2271 #: build/C/man2/io_setup.2:66
2273 "B<io_setup>() is Linux-specific and should not be used in programs that are "
2274 "intended to be portable."
2277 #. http://git.fedorahosted.org/git/?p=libaio.git
2279 #: build/C/man2/io_setup.2:75
2281 "Glibc does not provide a wrapper function for this system call. You could "
2282 "invoke it using B<syscall>(2). But instead, you probably want to use the "
2283 "B<io_setup>() wrapper function provided by I<libaio>."
2286 #. But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
2289 #: build/C/man2/io_setup.2:96
2291 "Note that the I<libaio> wrapper function uses a different type "
2292 "(I<io_context_t\\ *>) for the I<ctx_idp> argument. Note also that the "
2293 "I<libaio> wrapper does not follow the usual C library conventions for "
2294 "indicating errors: on error it returns a negated error number (the negative "
2295 "of one of the values listed in ERRORS). If the system call is invoked via "
2296 "B<syscall>(2), then the return value follows the usual conventions for "
2297 "indicating an error: -1, with I<errno> set to a (positive) value that "
2298 "indicates the error."
2304 #: build/C/man2/io_setup.2:104
2306 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_submit>(2), "
2311 #: build/C/man2/io_submit.2:7
2317 #: build/C/man2/io_submit.2:7
2323 #: build/C/man2/io_submit.2:10
2324 msgid "io_submit - submit asynchronous I/O blocks for processing"
2328 #: build/C/man2/io_submit.2:16
2331 "B<int io_submit(aio_context_t >I<ctx_id>B<, long >I<nr>B<, struct iocb "
2332 "**>I<iocbpp>B<);>\n"
2336 #: build/C/man2/io_submit.2:31
2338 "The B<io_submit>() system call queues I<nr> I/O request blocks for "
2339 "processing in the AIO context I<ctx_id>. The I<iocbpp> argument should be "
2340 "an array of I<nr> AIO control blocks, which will be submitted to context "
2345 #: build/C/man2/io_submit.2:37
2347 "On success, B<io_submit>() returns the number of I<iocb>s submitted (which "
2348 "may be 0 if I<nr> is zero). For the failure return, see NOTES."
2352 #: build/C/man2/io_submit.2:41
2353 msgid "Insufficient resources are available to queue any I<iocb>s."
2357 #: build/C/man2/io_submit.2:44
2358 msgid "The file descriptor specified in the first I<iocb> is invalid."
2362 #: build/C/man2/io_submit.2:56
2364 "The AIO context specified by I<ctx_id> is invalid. I<nr> is less than 0. "
2365 "The I<iocb> at I<*iocbpp[0]> is not properly initialized, or the operation "
2366 "specified is invalid for the file descriptor in the I<iocb>."
2370 #: build/C/man2/io_submit.2:60
2371 msgid "B<io_submit>() is not implemented on this architecture."
2375 #: build/C/man2/io_submit.2:68
2377 "B<io_submit>() is Linux-specific and should not be used in programs that "
2378 "are intended to be portable."
2381 #. http://git.fedorahosted.org/git/?p=libaio.git
2383 #: build/C/man2/io_submit.2:77
2385 "Glibc does not provide a wrapper function for this system call. You could "
2386 "invoke it using B<syscall>(2). But instead, you probably want to use the "
2387 "B<io_submit>() wrapper function provided by I<libaio>."
2393 #: build/C/man2/io_submit.2:106
2395 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), "
2400 #: build/C/man3/lio_listio.3:24
2406 #: build/C/man3/lio_listio.3:27
2407 msgid "lio_listio - initiate a list of I/O requests"
2411 #: build/C/man3/lio_listio.3:33
2414 "B<int lio_listio(int >I<mode>B<, struct aiocb *const >I<aiocb_list>B<[],>\n"
2415 "B< int >I<nitems>B<, struct sigevent *>I<sevp>B<);>\n"
2419 #: build/C/man3/lio_listio.3:41
2421 "The B<lio_listio>() function initiates the list of I/O operations described "
2422 "by the array I<aiocb_list>."
2426 #: build/C/man3/lio_listio.3:45
2427 msgid "The I<mode> operation has one of the following values:"
2431 #: build/C/man3/lio_listio.3:45
2437 #: build/C/man3/lio_listio.3:51
2439 "The call blocks until all operations are complete. The I<sevp> argument is "
2444 #: build/C/man3/lio_listio.3:51
2446 msgid "B<LIO_NOWAIT>"
2450 #: build/C/man3/lio_listio.3:63
2452 "The I/O operations are queued for processing and the call returns "
2453 "immediately. When all of the I/O operations complete, asynchronous "
2454 "notification occurs, as specified by the I<sevp> argument; see "
2455 "B<sigevent>(7) for details. If I<sevp> is NULL, no asynchronous "
2456 "notification occurs."
2460 #: build/C/man3/lio_listio.3:77
2462 "The I<aiocb_list> argument is an array of pointers to I<aiocb> structures "
2463 "that describe I/O operations. These operations are executed in an "
2464 "unspecified order. The I<nitems> argument specifies the size of the array "
2465 "I<aiocb_list>. NULL pointers in I<aiocb_list> are ignored."
2469 #: build/C/man3/lio_listio.3:83
2471 "In each control block in I<aiocb_list>, the I<aio_lio_opcode> field "
2472 "specifies the I/O operation to be initiated, as follows:"
2476 #: build/C/man3/lio_listio.3:83
2482 #: build/C/man3/lio_listio.3:89
2484 "Initiate a read operation. The operation is queued as for a call to "
2485 "B<aio_read>(3) specifying this control block."
2489 #: build/C/man3/lio_listio.3:89
2491 msgid "B<LIO_WRITE>"
2495 #: build/C/man3/lio_listio.3:95
2497 "Initiate a write operation. The operation is queued as for a call to "
2498 "B<aio_write>(3) specifying this control block."
2502 #: build/C/man3/lio_listio.3:95
2508 #: build/C/man3/lio_listio.3:98
2509 msgid "Ignore this control block."
2513 #: build/C/man3/lio_listio.3:108
2515 "The remaining fields in each control block have the same meanings as for "
2516 "B<aio_read>(3) and B<aio_write>(3). The I<aio_sigevent> fields of each "
2517 "control block can be used to specify notifications for the individual I/O "
2518 "operations (see B<sigevent>(7))."
2522 #: build/C/man3/lio_listio.3:118
2524 "If I<mode> is B<LIO_NOWAIT>, B<lio_listio>() returns 0 if all I/O "
2525 "operations are successfully queued. Otherwise, -1 is returned, and I<errno> "
2526 "is set to indicate the error."
2530 #: build/C/man3/lio_listio.3:128
2532 "If I<mode> is B<LIO_WAIT>, B<lio_listio>() returns 0 when all of the I/O "
2533 "operations have completed successfully. Otherwise, -1 is returned, and "
2534 "I<errno> is set to indicate the error."
2538 #: build/C/man3/lio_listio.3:146
2540 "The return status from B<lio_listio>() provides information only about the "
2541 "call itself, not about the individual I/O operations. One or more of the "
2542 "I/O operations may fail, but this does not prevent other operations "
2543 "completing. The status of individual I/O operations in I<aiocb_list> can be "
2544 "determined using B<aio_error>(3). When an operation has completed, its "
2545 "return status can be obtained using B<aio_return>(3). Individual I/O "
2546 "operations can fail for the reasons described in B<aio_read>(3) and "
2551 #: build/C/man3/lio_listio.3:150
2552 msgid "The B<lio_listio>() function may fail for the following reasons:"
2555 #. Doesn't happen in glibc(?)
2557 #: build/C/man3/lio_listio.3:161
2559 "The number of I/O operations specified by I<nitems> would cause the limit "
2560 "B<AIO_MAX> to be exceeded."
2563 #. Doesn't happen in glibc(?)
2565 #: build/C/man3/lio_listio.3:169
2566 msgid "I<mode> is invalid, or I<nitems> exceeds the limit B<AIO_LISTIO_MAX>."
2570 #: build/C/man3/lio_listio.3:178
2572 "I<mode> was B<LIO_WAIT> and a signal was caught before all I/O operations "
2573 "completed. (This may even be one of the signals used for asynchronous I/O "
2574 "completion notification.)"
2578 #: build/C/man3/lio_listio.3:178
2583 #. e.g., ioa_reqprio or aio_lio_opcode was invalid
2585 #: build/C/man3/lio_listio.3:186
2587 "One of more of the operations specified by I<aiocb_list> failed. The "
2588 "application can check the status of each operation using B<aio_return>(3)."
2592 #: build/C/man3/lio_listio.3:201
2594 "If B<lio_listio>() fails with the error B<EAGAIN>, B<EINTR>, or B<EIO>, "
2595 "then some of the operations in I<aiocb_list> may have been initiated. If "
2596 "B<lio_listio>() fails for any other reason, then none of the I/O operations "
2597 "has been initiated."
2601 #: build/C/man3/lio_listio.3:205
2602 msgid "The B<lio_listio>() function is available since glibc 2.1."
2605 #. or the control block of the operation
2607 #: build/C/man3/lio_listio.3:215
2609 "It is a good idea to zero out the control blocks before use. The control "
2610 "blocks must not be changed while the I/O operations are in progress. The "
2611 "buffer areas being read into or written from must not be accessed during the "
2612 "operations or undefined results may occur. The memory areas involved must "
2617 #: build/C/man3/lio_listio.3:227
2619 "B<aio_cancel>(3), B<aio_error>(3), B<aio_fsync>(3), B<aio_return>(3), "
2620 "B<aio_suspend>(3), B<aio_write>(3), B<aio>(7)"