posix/aio*: Added notification on request completion

The patch adds the generation of a notification after an Asynchronous I/O
request has been completed. The notification is generated using the aio_sigevent
filed in the aiocb struct, as defined by the posix specifiations.
A new control, ensuring the validity of the field, is added on each call to
aio_read(), aio_write() and aio_fsync().
The patch also adds tests to cover the new code, and fixes formatting errors of
various aio files.
This commit is contained in:
alessandronardin
2024-07-13 11:43:30 +02:00
parent e58ff8984c
commit 3b96aaddde
20 changed files with 543 additions and 222 deletions

View File

@@ -36,7 +36,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _AIO_H
#define _AIO_H
@@ -160,6 +159,7 @@ struct aiocb {
* - EINVAL the starting position of the file is past the maximum offset
* for this file.
* - EINVAL aiocbp is a NULL pointer
* - EINVAL aiocbp->sigevent is not valid.
*/
int aio_read(
struct aiocb *aiocbp
@@ -178,6 +178,7 @@ int aio_read(
* - EINVAL invalid aio_reqprio or aio_offset or aio_nbytes
* - EAGAIN not enough memory
* - EINVAL aiocbp is a NULL pointer
* - EINVAL aiocbp->sigevent is not valid.
*/
int aio_write(
struct aiocb *aiocbp
@@ -213,7 +214,6 @@ int aio_error(
const struct aiocb *aiocbp
);
/**
* @brief Retrieve Return Status of Asynchronous I/O Operation
*
@@ -284,6 +284,7 @@ int aio_suspend(
* - EINVAL A value of op other than O_SYNC was specified.
* The current implemetation only supports O_SYNC.
* - EINVAL aiocbp is a NULL pointer.
* - EINVAL aiocbp->sigevent is not valid.
*/
int aio_fsync(
int op,