1IO_GETEVENTS(2)            Linux Programmer's Manual           IO_GETEVENTS(2)
2
3
4

NAME

6       io_getevents - read asynchronous I/O events from the completion queue
7

SYNOPSIS

9       #include <linux/time.h>
10       #include <libaio.h>
11
12       int io_getevents(aio_context_t ctx_id, long min_nr, long nr,
13                        struct io_event *events, struct timespec *timeout);
14
15       Link with -laio.
16

DESCRIPTION

18       io_getevents()  attempts  to  read  at least min_nr events and up to nr
19       events from the completion  queue  of  the  AIO  context  specified  by
20       ctx_id.  timeout specifies the amount of time to wait for events, where
21       a NULL timeout waits until at least min_nr events have been seen.  Note
22       that timeout is relative and will be updated if not NULL and the opera‐
23       tion blocks.
24

RETURN VALUE

26       On success, io_getevents() returns the number of events read: 0  if  no
27       events  are  available, or less than min_nr if the timeout has elapsed.
28       For the failure return, see NOTES.
29

ERRORS

31       EFAULT Either events or timeout is an invalid pointer.
32
33       EINVAL ctx_id is invalid.  min_nr is out of  range  or  nr  is  out  of
34              range.
35
36       EINTR  Interrupted by a signal handler; see signal(7).
37
38       ENOSYS io_getevents() is not implemented on this architecture.
39

VERSIONS

41       The  asynchronous  I/O system calls first appeared in Linux 2.5, August
42       2002.
43

CONFORMING TO

45       io_getevents() is Linux-specific and should not  be  used  in  programs
46       that are intended to be portable.
47

NOTES

49       Glibc does not provide a wrapper function for this system call.
50
51       The  wrapper  provided in libaio for io_getevents() does not follow the
52       usual C library conventions for indicating error: on error it returns a
53       negated  error  number  (the  negative  of  one of the values listed in
54       ERRORS).  If the system call is invoked via syscall(2), then the return
55       value  follows  the usual conventions for indicating an error: -1, with
56       errno set to a (positive) value that indicates the error.
57

SEE ALSO

59       io_cancel(2), io_destroy(2), io_setup(2), io_submit(2), time(7)
60

COLOPHON

62       This page is part of release 3.25 of the Linux  man-pages  project.   A
63       description  of  the project, and information about reporting bugs, can
64       be found at http://www.kernel.org/doc/man-pages/.
65
66
67
68Linux                             2008-07-04                   IO_GETEVENTS(2)
Impressum