]> git.proxmox.com Git - qemu.git/commit - thread-pool.c
threadpool: drop global thread pool
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 7 Mar 2013 12:41:49 +0000 (13:41 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 15 Mar 2013 15:07:51 +0000 (16:07 +0100)
commitc4d9d19645a484298a67e9021060bc7c2b081d0f
tree6f60c9f368afcd5b2c4d089e1a3a9795500c9e74
parent85d126f3ee666702ac514c66606c62d276c4341c
threadpool: drop global thread pool

Now that each AioContext has a ThreadPool and the main loop AioContext
can be fetched with bdrv_get_aio_context(), we can eliminate the concept
of a global thread pool from thread-pool.c.

The submit functions must take a ThreadPool* argument.

block/raw-posix.c and block/raw-win32.c use
aio_get_thread_pool(bdrv_get_aio_context(bs)) to fetch the main loop's
ThreadPool.

tests/test-thread-pool.c must be updated to reflect the new
thread_pool_submit() function prototypes.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
block/raw-posix.c
block/raw-win32.c
include/block/thread-pool.h
tests/test-thread-pool.c
thread-pool.c