POSIX AIO library for linux Laurent Vivier Sébastien Dugué http://www.bullopensource.org/posix November 2005 This library uses the native AIO API of linux kernel to implement POSIX AIO. To use this library, you need at least a 2.6 vanilla kernel, but if you want a full implementation of POSIX AIO you'll need to patch this kernel. Features needing kernel patches are: FEATURE1: request completion event (enable sigevent field of struct aiocb) FEATURE2: list of requests completion event (enable sigevent parameter of lio_listio()) and kernel space LIO_WAIT mechanism. FEATURE3: aio_cancel() on a file descriptor (aiocb = NULL) Optional features needing kernel patches are: FEATURE5: system wide default value for max events (maxevents parameter of io_setup() ). By default, uses a developer defined value. Not implemented features, needing kernel patch (not available): - aio_reqprio, request priority management Patches repository: All patches can be found at //www.bullopensource.org/posix Patches for the 2.6.10 kernel upward are distributed as quilt patches. Build: Features supported by current kernel are autodetected by the configure script. But, you can enable/disable them with following script parameters: FEATURE1: --enable-aio-signal or --disable-aio-signal FEATURE2: --enable-lio-signal or --disable-lio-signal FEATURE3: --enable-cancel-fd or --disable-cancel-fd FEATURE4: --enable-lio-wait or --disable-lio-wait FEATURE5: --enable-default-maxevents or --disable-default-maxevents To build the library, you need to follow following steps: 1- patch your kernel with needed patches and install it 2- tar xf libposix-aio-*.tar.gz 3- cd libposix-aio-* 4- ./configure 5- make 6- make install (you must be root) If you want to use the library, you must link edit your application with libposix-aio. You can't use LD_PRELOAD to replace librt, because aiocb data structure is different. Send any comment to Laurent.Vivier@bull.net