Rechercher une page de manuel
lio_listio.2freebsd
Langue: en
Version: 266346 (debian - 07/07/09)
Section: 2 (Appels système)
BSD mandoc
NAME
lio_listio - list directed I/O (REALTIME)LIBRARY
Lb libcSYNOPSIS
In aio.h Ft int Fo lio_listio Fa int mode Fa struct aiocb * const list[] Fa int nent Fa struct sigevent *sig FcDESCRIPTION
The Fn lio_listio function initiates a list of I/O requests with a single function call. The Fa list argument is an array of pointers to Vt aiocb structures describing each operation to perform, with Fa nent elements. NULL elements are ignored.The aio_lio_opcode field of each Vt aiocb specifies the operation to be performed. The following operations are supported:
- LIO_READ
- Read data as if by a call to aio_read2.
- LIO_NOP
- No operation.
- LIO_WRITE
- Write data as if by a call to aio_write2.
If the Fa mode argument is LIO_WAIT Fn lio_listio does not return until all the requested operations have been completed. If Fa mode is LIO_NOWAIT the requests are processed asynchronously, and the signal specified by Fa sig is sent when all operations have completed. If Fa sig is NULL the calling process is not notified of I/O completion.
The order in which the requests are carried out is not specified; in particular, there is no guarantee that they will be executed in the order 0, 1, ..., Fa nent Ns -1 .
RETURN VALUES
If Fa mode is LIO_WAIT the Fn lio_listio function returns 0 if the operations completed successfully, otherwise -1.If Fa mode is LIO_NOWAIT the Fn lio_listio function returns 0 if the operations are successfully queued, otherwise -1.
ERRORS
The Fn lio_listio function will fail if:- Bq Er EAGAIN
- There are not enough resources to enqueue the requests.
- Bq Er EAGAIN
- The request would cause the system-wide limit AIO_MAX to be exceeded.
- Bq Er EINVAL
- The Fa mode argument is neither LIO_WAIT nor LIO_NOWAIT or Fa nent is greater than AIO_LISTIO_MAX
- Bq Er EINTR
- A signal interrupted the system call before it could be completed.
- Bq Er EIO
- One or more requests failed.
In addition, the Fn lio_listio function may fail for any of the reasons listed for aio_read2 and aio_write2.
If Fn lio_listio succeeds, or fails with an error code of Er EAGAIN , EINTR , or Er EIO , some of the requests may have been initiated. The caller should check the error status of each Vt aiocb structure individually by calling aio_error2.
SEE ALSO
aio_error2, aio_read2, aio_write2, read(2), write(2), siginfo(3), aio(4)STANDARDS
The Fn lio_listio function is expected to conform to St -p1003.1-2001 .Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre