_POSIX_ASYNCHRONOUS_IO
Asynchronous I/O is backed by the OS-managed request pool
(CONFIG_SYS_AIO): submitted operations are performed by a dedicated kernel
service queue that waits for descriptor readiness where the descriptor has a waitable
readiness condition (e.g. sockets and eventfds) and performs the operation directly
otherwise (e.g. regular files). Completion is observed with aio_error(),
aio_suspend(), and aio_return(), or announced by the control block’s
aio_sigevent (SIGEV_SIGNAL deliveries carry an SI_ASYNCIO code;
SIGEV_THREAD functions run in a fresh detached thread). lio_listio() with
LIO_NOWAIT supports a list-completion sigevent that fires once, when the last
operation of the list completes.
Notes on implementation-defined behaviour:
The buffer named by a control block must remain valid until the operation is retrieved with
aio_return(); closing a descriptor with operations in flight completes them withEBADF, so cancel before closing.aio_fsync()synchronizes data and metadata together:O_DSYNCandO_SYNCare equivalent.AIO_PRIO_DELTA_MAXis 0, soaio_reqpriomust be 0.AIO_MAXandAIO_LISTIO_MAXderive from the request pool bounds (CONFIG_POSIX_AIO_MAXandCONFIG_POSIX_AIO_LISTIO_MAX).
Enable this option with CONFIG_POSIX_ASYNCHRONOUS_IO.
API |
Supported |
|---|---|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |
|
yes |