Aio
Functions
#
aio_cancel(int fildes, struct aiocb *aiocbp)int aio_cancel (int fildes, struct aiocb *aiocbp)
Type: int
Parameters:
int
fildes
: the file descriptor- struct aiocb *
aiocbp
: a pointer to the AIO data structure
#
DetailsThis function is not supported this version.
Returns:
-1 with errno set to ENOTSUP
#
aio_error(const struct aiocb *aiocbp)int aio_error (const struct aiocb *aiocbp)
Type: int
Parameters:
- const struct aiocb *
aiocbp
: a pointer to the AIO data struture
#
DetailsThis function gets the error value for aiocbp.
Returns:
The error value for the operation or zero for no errors:
- EINPROGRESS: The operation is still in progress
- Other interface specific error
#
aio_fsync(int, struct aiocb *aiocbp)int aio_fsync (int, struct aiocb *aiocbp)
Type: int
Parameters:
int
- struct aiocb *
aiocbp
#
DetailsThis function is not supported this version.
Returns:
-1 with errno set to ENOTSUP
#
aio_read(struct aiocb *aiocbp)int aio_read (struct aiocb *aiocbp)
Type: int
Parameters:
- struct aiocb *
aiocbp
: a pointer to the AIO data struture
#
DetailsThe function initiates an asynchronous read using the data specified by aiocbp.
Returns:
0 on success or -1 with errno (see Errno) set to:
- EIO: failed to start the transfer
#
aio_return(struct aiocb *aiocbp)ssize_t aio_return (struct aiocb *aiocbp)
Type: ssize_t
Parameters:
- struct aiocb *
aiocbp
: a pointer to the AIO data struture
#
DetailsThis function returns the number of bytes read/written for the asynchronous operation.
Returns:
The number of bytes transferred or -1 if there was an error (or if the operation is not yet complete). aio_error() can be used to determine the error.
#
aio_suspend(struct aiocb const list[], int nent, const struct timespec timeout)int aio_suspend (struct aiocb *const list[], int nent, const struct timespec *timeout)
Type: int
Parameters:
- struct aiocb *const
list
: a list of AIO transfer structures int
nent
: the number of transfer in listconst struct timespec *
timeout
: the absolute timeout value
#
DetailsThis function will suspend the currently executing thread until an AIO operation in list completes or until the timeout value is surpassed. If timeout is NULL, it is ignored.
Returns:
0 on success or -1 with errno (see Errno) set to:
- EAGAIN: timeout was exceeded before any operations completed.
- EINTR: the thread received a signal before any operations completed.
#
aio_write(struct aiocb *aiocbp)int aio_write (struct aiocb *aiocbp)
Type: int
Parameters:
- struct aiocb *
aiocbp
: a pointer to the AIO data struture
#
DetailsThe function initiates an asynchronous write using the data specified by aiocbp.
Returns:
0 on success or -1 with errno (see Errno) set to:
- EIO: failed to start the transfer
#
lio_listio(int mode, struct aiocb const list[], int nent, struct sigevent sig)int lio_listio (int mode, struct aiocb *const list[], int nent, struct sigevent *sig)
Type: int
Parameters:
int
mode
: The mode: LIO_WAIT or LIO_NOWAIT- struct aiocb *const
list
: The list of AIO transfers int
nent
: The number of transfers in liststruct sigevent *
sig
: The sigevent structure
#
DetailsThis function initiates a list of asynchronous transfers.
Asynchronous notification is not supported in this version. ENOTSUP is returned if an attempt is made to invoke an asynchronous notification.
This function is experimental in this version.
Returns:
Zero on success or -1 with errno (see Errno) set to:
- EINTR: the thread received an signal before completed all transactions
- ENOTSUP: mode is LIO_NOWAIT and sig is not null or sigev_notify is not set to SIGEV_NONE
- EINVAL: mode is not set to LIO_NOWAIT or LIO_WAIT
#
suspend(struct aiocb const list[], int nent, const struct timespec timeout, u8 block_on_all)int suspend (struct aiocb *const list[], int nent, const struct timespec *timeout, u8 block_on_all)
Type: int
Parameters:
- struct aiocb *const
list
int
nent
const struct timespec *
timeout
u8
block_on_all