Manual Pages for Linux CentOS command on man io_setup
MyWebUniversity

Manual Pages for Linux CentOS command on man io_setup

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

NAME

iosetup - create an asynchronous I/O context SYNOPSIS

#include /* Defines needed types */ int iosetup(unsigned nrevents, aiocontextt *ctxidp); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION The iosetup() system call creates an asynchronous I/O context suitable for concurrently processing nrevents operations. The ctxidp argument must not point to an AIO context that already exists, and must be ini‐ tialized to 0 prior to the call. On successful creation of the AIO context, *ctxidp is filled in with the resulting handle. RETURN VALUE On success, iosetup() returns 0. For the failure return, see NOTES. ERRORS EAGAIN The specified nrevents exceeds the user's limit of available

events, as defined in /proc/sys/fs/aio-max-nr. EFAULT An invalid pointer is passed for ctxidp. EINVAL ctxidp is not initialized, or the specified nrevents exceeds internal limits. nrevents should be greater than 0. ENOMEM Insufficient kernel resources are available. ENOSYS iosetup() is not implemented on this architecture. VERSIONS The asynchronous I/O system calls first appeared in Linux 2.5. CONFORMING TO

iosetup() 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 iosetup() wrapper function provided by libaio. Note that the libaio wrapper function uses a different type (iocon‐ textt *) for the ctxidp 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. SEE ALSO iocancel(2), iodestroy(2), iogetevents(2), iosubmit(2), aio(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-06-21 IOSETUP(2)




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