Skip to main content

Aio

Classes#

Name
structaiocb
AIO Data Structure.

Functions#

Name
intaio_cancel(int fildes, struct aiocb * aiocbp)
intaio_error(const struct aiocb * aiocbp)
intaio_fsync(int op, struct aiocb * aiocbp)
intaio_read(struct aiocb * aiocbp)
intaio_write(struct aiocb * aiocbp)
ssize_taio_return(struct aiocb * aiocbp)
intsuspend(struct aiocb const list[], int nent, const struct timespec timeout, u8 block_on_all)
intaio_suspend(struct aiocb const list[], int nent, const struct timespec timeout)
intlio_listio(int mode, struct aiocb const list[], int nent, struct sigevent sig)

Defines#

Name
AIO_ALLDONE
AIO_CANCELED
AIO_NOTCANCELED
LIO_NOP
LIO_NOWAIT
LIO_READ
LIO_WAIT
LIO_WRITE

Functions Documentation#

aio_cancel#

int aio_cancel(    int fildes,    struct aiocb * aiocbp)

Return: -1 with errno set to ENOTSUP

This function is not supported this version.

aio_error#

int aio_error(    const struct aiocb * aiocbp)

Return: The error value for the operation or zero for no errors:

  • EINPROGRESS: The operation is still in progress
  • Other interface specific error

This function gets the error value for aiocbp.

aio_fsync#

int aio_fsync(    int op,    struct aiocb * aiocbp)

Return: -1 with errno set to ENOTSUP

This function is not supported this version.

aio_read#

int aio_read(    struct aiocb * aiocbp)

Return: 0 on success or -1 with errno (see Errno) set to:

  • EIO: failed to start the transfer

The function initiates an asynchronous read using the data specified by aiocbp.

aio_write#

int aio_write(    struct aiocb * aiocbp)

Return: 0 on success or -1 with errno (see Errno) set to:

  • EIO: failed to start the transfer

The function initiates an asynchronous write using the data specified by aiocbp.

aio_return#

ssize_t aio_return(    struct aiocb * aiocbp)

Return: 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.

This function returns the number of bytes read/written for the asynchronous operation.

suspend#

int suspend(    struct aiocb *const list[],    int nent,    const struct timespec * timeout,    u8 block_on_all)

aio_suspend#

int aio_suspend(    struct aiocb *const list[],    int nent,    const struct timespec * timeout)

Return: 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.

This 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.

lio_listio#

int lio_listio(    int mode,    struct aiocb *const list[],    int nent,    struct sigevent * sig)

Return: Zero on success or -1 with errno (see Errno) set to:

  • EINTR: the thread received an signal before completed all transactions
  • ENOTSUP: mode is LIONOWAIT 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

Note:

  • 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.

This function initiates a list of asynchronous transfers.

Macros Documentation#

AIO_ALLDONE#

#define AIO_ALLDONE 

AIO_CANCELED#

#define AIO_CANCELED 

AIO_NOTCANCELED#

#define AIO_NOTCANCELED 

LIO_NOP#

#define LIO_NOP 

LIO_NOWAIT#

#define LIO_NOWAIT 

LIO_READ#

#define LIO_READ 

LIO_WAIT#

#define LIO_WAIT 

LIO_WRITE#

#define LIO_WRITE 

Updated on 18 September 2021 at 21:44:08 MDT