aio: introduce AioContext, move bottom halves there

Start introducing AioContext, which will let us remove globals from
aio.c/async.c, and introduce multiple I/O threads.

The bottom half functions now take an additional AioContext argument.
A bottom half is created with a specific AioContext that remains the
same throughout the lifetime.  qemu_bh_new is just a wrapper that
uses a global context.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-10-29 23:45:23 +01:00
parent 9958c351ee
commit f627aab1cc
11 changed files with 119 additions and 72 deletions

View file

@ -26,6 +26,7 @@
#include "qemu-common.h"
#include "qemu-char.h"
#include "qemu-queue.h"
#include "qemu-aio.h"
#include "main-loop.h"
#ifndef _WIN32