1IO_GETEVENTS(2) Linux Programmer's Manual IO_GETEVENTS(2)
2
3
4
6 io_getevents - Read asynchronous I/O events from the completion queue
7
9 #include <linux/time.h>
10
11
12
13 #include <libaio.h>
14
15
16
17 int io_getevents (aio_context_t ctx_id, long min_nr, long nr,
18 struct io_event *events, struct timespec *timeout);
19
20
22 io_getevents() attempts to read at least min_nr events and up to nr
23 events from the completion queue of the AIO context specified by
24 ctx_id. timeout specifies the amount of time to wait for events, where
25 a NULL timeout waits until at least min_nr events have been seen. Note
26 that timeout is relative and will be updated if not NULL and the opera‐
27 tion blocks.
28
29
31 io_getevents() returns the number of events read: 0 if no events are
32 available or < min_nr if the timeout has elapsed.
33
34
36 EINVAL ctx_id is invalid. min_nr is out of range or nr is out of range.
37
38
39 EFAULT Either events or timeout is an invalid pointer.
40
41
42 ENOSYS io_getevents() is not implemented on this architecture.
43
44
46 io_getevents() is Linux specific and should not be used in programs
47 that are intended to be portable.
48
49
51 The asynchronous I/O system calls first appeared in Linux 2.5, August
52 2002.
53
54
56 io_setup(2), io_submit(2), io_getevents(2), io_cancel(2), io_de‐
57 stroy(2).
58
59
61 The asynchronous I/O system calls were written by Benjamin LaHaise.
62
63
65 Kent Yoder.
66
67
68
69Linux 2.4 2003-02-21 IO_GETEVENTS(2)