Boost logo

Boost :

From: Boris (boris_at_[hidden])
Date: 2005-03-29 11:29:32


Robert Ramey wrote:
> I refreshed my memory re aio.h and found it uses no callback.
>
> aio_read
> Start an asynchronous read operation
> aio_write
> Start an asynchronous write operation
> lio_listio
> Start a list of asynchronous I/O operations
> aio_suspend
> Wait for completion of one or more asynchronous I/O operations
> aio_error
> Retrieve the error status of an asynchronous I/O operation
> aio_return
> Retrieve the return status of an asynchronous I/O operation and free
> any associated system resources
> aio_cancel
> Request cancellation of a pending asynchronous I/O operation
> aio_fsync
> Initiate synchronization of the media image of a file to which
> asynchronous operations have been addressed

Please have a look at struct aiocb. A pointer to this struct is passed to
the functions you have listed above. It has a member called aio_sigevent
which is of type sigevent. This is another struct which has a member called
sigev_notify_function which is of type void(*)(unsigned sigval). If you use
POSIX aio there is either a signal generated or a function called as a
thread.

> The question here is:
>
> iIs aio.h interface not sufficient in some way? If not, what
> facility is it missing? If it is sufficient, then just depend on the
> available implementation or re-implement the interface in the most
> convenient way.

I am not sure if we are still talking about asynchronous I/O or
asynchronicity in general as things seem to get mixed up?

Boris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk