Query: lio_listio
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
lio_listio(2) System Calls Manual lio_listio(2)NAMElio_listio() - start a list of asynchronous I/O operationsSYNOPSISDESCRIPTIONThe function allows the calling process to request a list of asynchronous I/O operations with a single function call. The function call returns when all operation requests have been enqueued for processing. At this point, processing of the operations may proceed concur- rently with execution of the calling process or thread. The argument is an array of pointers to structures. Each in is treated as if it were being handled in a separate call to or depending on the value of its When is the is treated as though it had been referenced in a call to and the and fields are interpreted accordingly. When is the is treated as though it had been referenced in a call to and the and fields are interpreted accordingly. If is nothing is enqueued. If an error condition is detected that prevents the list from being processed, returns and sets to indicate the cause of the failure. If any requests are enqueued by the call to and is then the function returns only after all enqueued operation requests have completed. The sig argument of the call is ignored. If is the function returns as soon as all requests are enqueued. The action specified by sig is per- formed after all enqueued requests have completed. Once the requested operations have been successfully enqueued, an and function referencing the corresponding from must be used to determine their status and any error conditions, including those normally reported by or as appropriate. Requests remain enqueued and consume process and system resources until is called for each one. Re-using or deallocating memory referred to by the or any referenced in the while an asynchronous I/O operation is outstanding (i.e. before has been called) may produce unpredictable results. To use this function, link in the realtime library by specifying on the compiler or linker command line.RETURN VALUEWhen is set, returns the following values: Success. All of the non-empty operations, if any, were successfully enqueued. Failure or partial success. At least one requested operation was either not enqueued or completed with an error before the function call returned. is set to indicate the error. When is set, returns the following values: Success. All of the non-empty operations, if any, were successfully enqueued and completed. Failure or partial success. At least one requested operation was either not enqueued or completed with an error. is set to indicate the error. The three values and are the only ones associated with partial success. and must be used to determine the outcomes of individual requests.ERRORSIf detects one of the following error conditions, is set to the indicated value: [EAGAIN] At least one request could not be queued either because of a resource shortage or because the per-process or system- wide limit on asynchronous I/O operations or asynchronous threads would have been exceeded. [EINVAL] The specified by sig is not valid. [EINVAL] The argument is neither nor [EINVAL] The value of the argument is negative or greater than the maximum value allowed. The maximum value allowed can be obtained using the call with the argument [EINTR] The argument was and a signal was delivered while waiting for the requested operations to complete. This signal may result from completion of one or more of the requested operations and other requests may still be pending or com- pleted. Once an operation has been enqueued by the following errors, in addition to all of the errors normally reported by the appropriate or func- tion, may be reported asynchronously by a subsequent call to or referencing its [EBADF] The was not a valid file descriptor open for reading or writing as appropriate to the [EINVAL] The value of is not valid, or the value of is invalid, or the file offset implied by or is not valid. [EIO] One or more of the enqueued operations did not complete successfully.EXAMPLEThe following code sequence and call to starts two asynchronous write operations and one asynchronous read operation and waits for all operations to complete.SEE ALSOaio_cancel(2), aio_error(2), aio_fsync(2), aio_read(2), aio_return(2), aio_suspend(2), aio_write(2), read(2), write(2), aio(5).STANDARDS CONFORMANCElio_listio(2)