From 6b5f876252b7aeec43e319afdf17705f512be2bc Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 20 Feb 2013 11:28:32 +0100 Subject: aio: convert aio_poll() to g_poll(3) AioHandler already has a GPollFD so we can directly use its events/revents. Add the int pollfds_idx field to AioContext so we can map g_poll(3) results back to AioHandlers. Reuse aio_dispatch() to invoke handlers after g_poll(3). Signed-off-by: Stefan Hajnoczi Reviewed-by: Laszlo Ersek Message-id: 1361356113-11049-10-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori --- include/block/aio.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/block/aio.h') diff --git a/include/block/aio.h b/include/block/aio.h index 8eda924599..5b54d383fc 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -63,6 +63,9 @@ typedef struct AioContext { /* Used for aio_notify. */ EventNotifier notifier; + + /* GPollFDs for aio_poll() */ + GArray *pollfds; } AioContext; /* Returns 1 if there are still outstanding AIO requests; 0 otherwise */ -- cgit v1.2.1