aboutsummaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
authorAlex Bligh <alex@alex.org.uk>2013-08-21 16:02:50 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-08-22 19:10:28 +0200
commitd5541d86806acc2e1a3cf9e1402370ba884e9fe1 (patch)
tree060b78658b1670a132a9ec8f5e4d8f3f1bbb2ed4 /async.c
parentdae21b98b973e8d878a92b44f70a51aa8d4c739b (diff)
aio / timers: Add a notify callback to QEMUTimerList
Add a notify pointer to QEMUTimerList so it knows what to notify on a timer change. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'async.c')
-rw-r--r--async.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/async.c b/async.c
index cd4a4898ed..cff0ab9e15 100644
--- a/async.c
+++ b/async.c
@@ -234,6 +234,11 @@ void aio_notify(AioContext *ctx)
event_notifier_set(&ctx->notifier);
}
+static void aio_timerlist_notify(void *opaque)
+{
+ aio_notify(opaque);
+}
+
AioContext *aio_context_new(void)
{
AioContext *ctx;
@@ -245,7 +250,7 @@ AioContext *aio_context_new(void)
aio_set_event_notifier(ctx, &ctx->notifier,
(EventNotifierHandler *)
event_notifier_test_and_clear);
- timerlistgroup_init(&ctx->tlg);
+ timerlistgroup_init(&ctx->tlg, aio_timerlist_notify, ctx);
return ctx;
}