Manual Pages for Linux CentOS command on man io_getevents
MyWebUniversity

Manual Pages for Linux CentOS command on man io_getevents

IOGETEVENTS(2) Linux Programmer's Manual IOGETEVENTS(2)

NAME

iogetevents - read asynchronous I/O events from the completion queue SYNOPSIS

#include /* Defines needed types */

#include /* Defines 'struct timespec' */ int iogetevents(aiocontextt ctxid, long minnr, long nr, struct ioevent *events, struct timespec *timeout); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION The iogetevents() system call attempts to read at least minnr events and up to nr events from the completion queue of the AIO context speci‐ fied by ctxid. The timeout argument specifies the amount of time to wait for events, where a NULL timeout waits until at least minnr events have been seen. Note that timeout is relative. RETURN VALUE On success, iogetevents() returns the number of events read: 0 if no events are available, or less than minnr if the timeout has elapsed. For the failure return, see NOTES. ERRORS EFAULT Either events or timeout is an invalid pointer. EINVAL ctxid is invalid. minnr is out of range or nr is out of range. EINTR Interrupted by a signal handler; see signal(7). ENOSYS iogetevents() is not implemented on this architecture. VERSIONS The asynchronous I/O system calls first appeared in Linux 2.5. CONFORMING TO

iogetevents() is Linux-specific and should not be used in programs that are intended to be portable. NOTES Glibc does not provide a wrapper function for this system call. You could invoke it using syscall(2). But instead, you probably want to use the iogetevents() wrapper function provided by libaio. Note that the libaio wrapper function uses a different type (iocon‐ textt) for the ctxid argument. Note also that the libaio wrapper does not follow the usual C library conventions for indicating errors: on error it returns a negated error number (the negative of one of the values listed in ERRORS). If the system call is invoked via syscall(2), then the return value follows the usual conventions for

indicating an error: -1, with errno set to a (positive) value that indicates the error. BUGS An invalid ctxid may cause a segmentation fault instead of genenerat‐ ing the error EINVAL. SEE ALSO iocancel(2), iodestroy(2), iosetup(2), iosubmit(2), aio(7), time(7) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2013-04-08 IOGETEVENTS(2)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™