diff options
author | Alex Bligh <alex@alex.org.uk> | 2013-08-21 16:02:50 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-08-22 19:10:28 +0200 |
commit | d5541d86806acc2e1a3cf9e1402370ba884e9fe1 (patch) | |
tree | 060b78658b1670a132a9ec8f5e4d8f3f1bbb2ed4 /async.c | |
parent | dae21b98b973e8d878a92b44f70a51aa8d4c739b (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; } |