Initiates a list of asynchronous I/O requests with a single call.
#include <aio.h>
int lio_listio (cmd,
list, nent, eventp)
int cmd, nent;
struct liocb * list[ ];
struct event * eventp;
int lio_listio64 (cmd, list,nent, eventp) int cmd, nent; struct liocb64 *list; struct event *eventp;
The lio_listio subroutine allows the calling process to initiate the nent parameter asynchronous I/O requests. These requests are specified in the liocb structures pointed to by the elements of the list array. The call may block or return immediately depending on the cmd parameter. If the cmd parameter requests that I/O completion be asynchronously notified, a SIGIO signal is delivered when all I/O operations are completed.
The lio_listio64 subroutine is similar to the lio_listio subroutine except that it takes an array of pointers to liocb64 structures. This allows the lio_listio64 subroutine to specify offsets in excess of OFF_MAX (2 gigbytes minus 1).
In the large file enabled programming environment, lio_listio is redefined to be lio_listio64.
Note: The SIGIO signal will be replaced by real-time signals when they are available. The pointer to the event structure eventp parameter is currently not in use but is included for future compatibility.
The lio_listio and lio_listio64 subroutines can be called from the process environment only.
When the lio_listio subroutine is successful, it returns a value of 0. Otherwise, it returns a value of -1 and sets the errno global variable to identify the error. The returned value indicates the success or failure of the lio_listio subroutine itself and not of the asynchronous I/O requests (except when the command is LIO_WAIT). The aio_error subroutine returns the status of each I/O request.
Return codes can be set to the
following errno values:
The lio_listio and lio_listio64 subroutines are part of the Base Operating System (BOS) Runtime.
The aio_cancel or aio_cancel64 (aio_cancel or aio_cancel64 Subroutine) subroutine, aio_error or aio_error64 (aio_error or aio_error64 Subroutine) subroutine, aio_read or aio_read64 (aio_read or aio_read64 Subroutine) subroutine, aio_return or aio_return64 (aio_return or aio_return64 Subroutine) subroutine, aio_suspend or aio_suspend64 (aio_suspend or aio_suspend64 Subroutine) subroutine, aio_write or aio_write64 (aio_write or aio_write64 Subroutine) subroutine.
The Asynchronous I/O Overview and the Communications I/O Subsystem: Programming Introduction in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
The Input and Output Handling Programmer's Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs describes the files, commands, and subroutines used for low-level, stream, terminal, and asynchronous I/O interfaces.