qemu/include/block
Stefan Hajnoczi 9b34277d23 aio: add a ThreadPool instance to AioContext
This patch adds a ThreadPool to AioContext.  It's possible that some
AioContext instances will never use the ThreadPool, so defer creation
until aio_get_thread_pool().

The reason why AioContext should have the ThreadPool is because the
ThreadPool is bound to a AioContext instance where the work item's
callback function is invoked.  It doesn't make sense to keep the
ThreadPool pointer anywhere other than AioContext.  For example,
block/raw-posix.c can get its AioContext's ThreadPool and submit work.

Special note about headers: I used struct ThreadPool in aio.h because
there is a circular dependency if aio.h includes thread-pool.h.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-15 16:07:50 +01:00
..
aes.h block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
aio.h aio: add a ThreadPool instance to AioContext 2013-03-15 16:07:50 +01:00
block.h block: Add options QDict to bdrv_open() prototype 2013-03-15 16:07:49 +01:00
block_int.h block: Add options QDict to bdrv_open() prototype 2013-03-15 16:07:49 +01:00
blockjob.h block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
coroutine.h misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
coroutine_int.h misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
nbd.h block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
thread-pool.h threadpool: add thread_pool_new() and thread_pool_free() 2013-03-15 16:07:50 +01:00