Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

RTFile Async I/O - Linux Implementation Notes

For internal use only.

Linux implements the kernel async I/O API through the io_* syscalls. They are not exposed in the glibc (the aio_* API uses userspace threads and blocking I/O operations to simulate async behavior). There is an external library called libaio which implements these syscalls but because we don't want to have another dependency and this library is not installed by default and the interface is really simple we use the kernel interface directly using wrapper functions.

The interface has some limitations. The first one is that the file must be opened with O_DIRECT. This disables caching done by the kernel which can be compensated if the user of this API implements caching itself. The next limitation is that data buffers must be aligned at a 512 byte boundary or the request will fail.

Generated by  Doxygen 1.6.0   Back to index