From d5541d86806acc2e1a3cf9e1402370ba884e9fe1 Mon Sep 17 00:00:00 2001 From: Alex Bligh Date: Wed, 21 Aug 2013 16:02:50 +0100 Subject: 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 Signed-off-by: Stefan Hajnoczi --- async.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'async.c') 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; } -- cgit v1.2.1