aboutsummaryrefslogtreecommitdiff
path: root/aio.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-04-12 14:00:54 +0200
committerKevin Wolf <kwolf@redhat.com>2012-04-19 16:37:53 +0200
commitbafbd6a1c69fef73500309dc31c86984c6d22b43 (patch)
tree6572fe65223273c25466929eb9495da066652343 /aio.c
parentadfe92f6d18c0e0a3694e19abb58eb55fd0c5993 (diff)
aio: remove process_queue callback and qemu_aio_process_queue
Both unused after the previous patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'aio.c')
-rw-r--r--aio.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/aio.c b/aio.c
index eb3bf42574..f19b3c6b09 100644
--- a/aio.c
+++ b/aio.c
@@ -35,7 +35,6 @@ struct AioHandler
IOHandler *io_read;
IOHandler *io_write;
AioFlushHandler *io_flush;
- AioProcessQueue *io_process_queue;
int deleted;
void *opaque;
QLIST_ENTRY(AioHandler) node;
@@ -58,7 +57,6 @@ int qemu_aio_set_fd_handler(int fd,
IOHandler *io_read,
IOHandler *io_write,
AioFlushHandler *io_flush,
- AioProcessQueue *io_process_queue,
void *opaque)
{
AioHandler *node;
@@ -91,7 +89,6 @@ int qemu_aio_set_fd_handler(int fd,
node->io_read = io_read;
node->io_write = io_write;
node->io_flush = io_flush;
- node->io_process_queue = io_process_queue;
node->opaque = opaque;
}
@@ -122,39 +119,17 @@ void qemu_aio_flush(void)
} while (qemu_bh_poll() || ret > 0);
}
-int qemu_aio_process_queue(void)
-{
- AioHandler *node;
- int ret = 0;
-
- walking_handlers = 1;
-
- QLIST_FOREACH(node, &aio_handlers, node) {
- if (node->io_process_queue) {
- if (node->io_process_queue(node->opaque)) {
- ret = 1;
- }
- }
- }
-
- walking_handlers = 0;
-
- return ret;
-}
-
void qemu_aio_wait(void)
{
int ret;
- if (qemu_bh_poll())
- return;
-
/*
* If there are callbacks left that have been queued, we need to call then.
* Return afterwards to avoid waiting needlessly in select().
*/
- if (qemu_aio_process_queue())
+ if (qemu_bh_poll()) {
return;
+ }
do {
AioHandler *node;