aio_init

Date:

10-20-2011

NAME

aio_init - Asynchronous I/O initialization

SYNOPSIS

#include <aio.h>

void aio_init(aioinit_t *);

DESCRIPTION

The aio_init function allows the calling process to initialize the asynchronous I/O interface. If this function is not called, the asynchronous I/O interface is initialized the first time a call is made to aio_read, aio_write, or lio_listio.

The aio_init function takes an aioinit_t * as an argument. If this argument is NULL, default initialization values are used. Initialization of the interface includes starting up slave threads which are used to carry out I/O requests.

The aio_init structure contains the following fields:

numslaves

Default is 8. The number of threads that the aio library will use from user space. While the user can queue up many operations to be done by the aio library, they are currently passed to the kernel one at a time by each thread. The aio_threads value allows the user to pick the level of parallelism that their application needs. The FFIO_AIO_SLAVES environment variable, if specified, will override this value.

numreqs

Default is 8. Maximum number of outstanding aio requests. This should be greater than or equal to the numslaves field. The FFIO_AIO_AIOREQS environment variable, if specified, will override this value.

SEE ALSO

aio_cancel(3c), aio_error(3c), aio_return(3c), aio_write(3c), lio_listio(3c)

realtime(5)