diff options
author | Alex Bligh <alex@alex.org.uk> | 2013-08-21 16:02:49 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-08-22 19:10:27 +0200 |
commit | dae21b98b973e8d878a92b44f70a51aa8d4c739b (patch) | |
tree | 6cb0d9a0bd76967cf37fc6244fcc70077de504b6 /tests | |
parent | 754d6a544d044bddeef87e9a63b4f511f59f3c4e (diff) | |
download | qemu-dae21b98b973e8d878a92b44f70a51aa8d4c739b.zip qemu-dae21b98b973e8d878a92b44f70a51aa8d4c739b.tar.gz qemu-dae21b98b973e8d878a92b44f70a51aa8d4c739b.tar.bz2 |
aio / timers: Add QEMUTimerListGroup to AioContext
Add a QEMUTimerListGroup each AioContext (meaning a QEMUTimerList
associated with each clock is added) and delete it when the
AioContext is freed.
Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-aio.c | 3 | ||||
-rw-r--r-- | tests/test-thread-pool.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-aio.c b/tests/test-aio.c index 1ab5637..e1f394b 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -12,6 +12,7 @@ #include <glib.h> #include "block/aio.h" +#include "qemu/timer.h" AioContext *ctx; @@ -630,6 +631,8 @@ int main(int argc, char **argv) { GSource *src; + init_clocks(); + ctx = aio_context_new(); src = aio_get_g_source(ctx); g_source_attach(src, NULL); diff --git a/tests/test-thread-pool.c b/tests/test-thread-pool.c index 8188d1a..c1f8e13 100644 --- a/tests/test-thread-pool.c +++ b/tests/test-thread-pool.c @@ -3,6 +3,7 @@ #include "block/aio.h" #include "block/thread-pool.h" #include "block/block.h" +#include "qemu/timer.h" static AioContext *ctx; static ThreadPool *pool; @@ -205,6 +206,8 @@ int main(int argc, char **argv) { int ret; + init_clocks(); + ctx = aio_context_new(); pool = aio_get_thread_pool(ctx); |