]> git.proxmox.com Git - qemu.git/commit - aio-posix.c
aio: extract aio_dispatch() from aio_poll()
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 20 Feb 2013 10:28:31 +0000 (11:28 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 21 Feb 2013 22:17:31 +0000 (16:17 -0600)
commitd0c8d2c05f67a1a007d87fa3b99254abfa42d06d
treeada60845139760d25723bb77ba0c105b023dbd04
parent9cbaacf999b01b27dc3a22502705178057af66de
aio: extract aio_dispatch() from aio_poll()

We will need to loop over AioHandlers calling ->io_read()/->io_write()
when aio_poll() is converted from select(2) to g_poll(2).

Luckily the code for this already exists, extract it into the new
aio_dispatch() function.

Two small changes:

 * aio_poll() checks !node->deleted to avoid calling handlers that have
   been deleted.

 * Fix typo 'then' -> 'them' in aio_poll() comment.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1361356113-11049-9-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
aio-posix.c