mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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 <stefanha@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1361356113-11049-10-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d0c8d2c05f
commit
6b5f876252
3 changed files with 29 additions and 43 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue