Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

aio_suspend(2) [debian man page]

AIO_SUSPEND(2)						      BSD System Calls Manual						    AIO_SUSPEND(2)

NAME
aio_suspend -- suspend until asynchronous I/O operations or timeout complete (REALTIME) LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <aio.h> int aio_suspend(const struct aiocb *const iocbs[], int niocb, const struct timespec *timeout); DESCRIPTION
The aio_suspend() system call suspends the calling process until at least one of the specified asynchronous I/O requests have completed, a signal is delivered, or the timeout has passed. The iocbs argument is an array of niocb pointers to asynchronous I/O requests. Array members containing null pointers will be silently ignored. If timeout is not a null pointer, it specifies a maximum interval to suspend. If timeout is a null pointer, the suspend blocks indefinitely. To effect a poll, the timeout should point to a zero-value timespec structure. RETURN VALUES
If one or more of the specified asynchronous I/O requests have completed, aio_suspend() returns 0. Otherwise it returns -1 and sets errno to indicate the error, as enumerated below. ERRORS
The aio_suspend() system call will fail if: [EAGAIN] the timeout expired before any I/O requests completed. [EINVAL] The iocbs argument contains more than AIO_LISTIO_MAX asynchronous I/O requests, or at least one of the requests is not valid. [EINTR] the suspend was interrupted by a signal. SEE ALSO
aio_cancel(2), aio_error(2), aio_return(2), aio_waitcomplete(2), aio_write(2), aio(4) STANDARDS
The aio_suspend() system call is expected to conform to the IEEE Std 1003.1 (``POSIX.1'') standard. HISTORY
The aio_suspend() system call first appeared in FreeBSD 3.0. AUTHORS
This manual page was written by Wes Peters <wes@softweyr.com>. BSD
June 2, 1999 BSD

Check Out this Related Man Page

aio_suspend(3)						     Library Functions Manual						    aio_suspend(3)

NAME
aio_suspend - Suspends the calling process until at least one of the specified asynchronous I/O requests has completed, until a signal interrupts the function, or until a timeout interval, if specified, has passed (P1003.1b) LIBRARY
Asynchronous I/O Library (libaio, libaio_raw) SYNOPSIS
#include <aio.h> int aio_suspend ( const struct aiocb *list[], int nent, const struct timespec *timeout[]); PARAMETERS
*list An array of pointers to asynchronous I/O control blocks. nent The number of elements in the array. This number specifies the number of asynchronous I/O operations. *timeout A pointer to a timespec structure. If timeout is NULL, the argument is ignored. DESCRIPTION
The aio_suspend function suspends the calling process until at least one asynchronous I/O operation has completed, until a signal inter- rupts the function, or until a timeout interval, if specified, has passed. At the time of the call, if an asynchronous I/O operation spec- ified in the aiocbp array corresponds to completed asynchronous I/O operations, the function returns without suspending the calling process. The list argument is an array of pointers to aiocb data structures. The nent argument indicates the number of elements in the array. Each aiocbp structure must have been used in initiating an asynchronous I/O request by a call to the aio_read, aio_write, or lio_listio func- tions. RETURN VALUES
If the aio_suspend function returns due to an asynchronous I/O completion, a value of 0 (zero) is returned. The application may determine which asynchronous I/O operations finished by calling the aio_error and aio_return functions. On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS
The aio_suspend function fails under the following conditions: [EAGAIN] No asynchronous I/O operation indicated in the list referenced by list completed in the time interval indicated by timeout. [EINTR] A signal interrupted the aio_suspend function. Note that, because each asynchronous I/O operation may invoke a signal when it completes, this error return may be caused by the completion of one or more of the I/O operations being awaited. [EIVAL] An invalid time value was specified in timeout, or nent is greater than the maximum number of list elements allowed, AIO_LISTIO_MAX. RELATED INFORMATION
Functions: aio_group_completion_np(3), aio_read(3), aio_results_np(3), aio_write(3), lio_listio(3) Guide to Realtime Programming delim off aio_suspend(3)
Man Page