mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
754d6a544d
commit
dae21b98b9
4 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue