Visible to Intel only — GUID: GUID-EFF82E51-2F69-4B3E-8D4D-807481204FE2
Visible to Intel only — GUID: GUID-EFF82E51-2F69-4B3E-8D4D-807481204FE2
Intel's C++ Asynchronous I/O Library for Windows
Intel's C/C++ asynchronous I/O (AIO) library implementation for Windows is like the POSIX AIO library implementation for Linux.
The differences between Intel's C/C++ AIO Windows implementation and the standard POSIX AIO implementation are listed below:
- With struct aiocb:
- The Windows compatible type HANDLE replaces the POSIX AIO type unsigned int for the file descriptor aio_fildes.
- The type intptr_t replaces the POSIX AIO types ssize_t and __off_t.
- The structure specifying the signal event descriptor, struct sigevent, is like the Linux implementation of the POSIX AIO library. It differs from the Linux implementation in the following ways:
- Signal notification and non-notification for thread call-back is supported.
- Signal notification on completion of the AIO operation is not supported.
This is true for programs already written for Linux/Unix and ported to Windows to set up an AIO completion handler without the name of the handler set in the aiocb struct. Because of the way that signals are supported in Windows, this is impossible to implement. For new applications or to port existing applications, you should set the handler's name before calling the aio_read or aio_write routines. For example:
static void aio_CompletionRoutine(sigval_t sigval) { // … code … } … code … my_aio.aio_sigevent.sigev_notify = SIGEV_THREAD; my_aio.aio_sigevent.sigev_notify_function = aio_CompletionRoutine;
Intel's asynchronous I/O library functions listed below are all based on POSIX AIO functions. They are defined in the aio.h file.
- aio_read
Performs an asynchronous read operation. - aio_write
Performs an asynchronous write operation. - Example for aio_read and aio_write Functions
- aio_suspend
Suspends the calling process until one of the asynchronous I/O operations completes. - Example for aio_suspend Function
- aio_error
Returns error status for asynchronous I/O requests. - aio_return
Returns the final return status for the asynchronous I/O request. - Example for aio_error and aio_return Functions
- aio_fsync
Synchronizes all outstanding asynchronous I/O operations. - aio_cancel
Cancels outstanding asynchronous I/O requests for the file descriptor fd. - Example for aio_cancel Function
- lio_listio
Performs an asynchronous read operation. - Example for lio_listio Function
- Asynchronous I/O Function Errors