From 4e8a3561652ebcda6a126b3162fc545573889dc4 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 13 Feb 2015 00:27:45 -0500 Subject: overhaul aio implementation for correctness previously, aio operations were not tracked by file descriptor; each operation was completely independent. this resulted in non-conforming behavior for non-seekable/append-mode writes (which are required to be ordered) and made it impossible to implement aio_cancel, which in turn made closing file descriptors with outstanding aio operations unsafe. the new implementation is significantly heavier (roughly twice the size, and seems to be slightly slower) and presently aims mainly at correctness, not performance. most of the public interfaces have been moved into a single file, aio.c, because there is little benefit to be had from splitting them. whenever any aio functions are used, aio_cancel and the internal queue lifetime management and fd-to-queue mapping code must be linked, and these functions make up the bulk of the code size. the close function's interaction with aio is implemented with weak alias magic, to avoid pulling in heavy aio cancellation code in programs that don't use aio, and the expensive cancellation path (which includes signal blocking) is optimized out when there are no active aio queues. --- src/aio/aio_return.c | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 src/aio/aio_return.c (limited to 'src/aio/aio_return.c') diff --git a/src/aio/aio_return.c b/src/aio/aio_return.c deleted file mode 100644 index c1ce450c..00000000 --- a/src/aio/aio_return.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "libc.h" - -ssize_t aio_return(struct aiocb *cb) -{ - return cb->__ret; -} - -LFS64(aio_return); -- cgit v1.2.1