Skip to content
  • Stefan Hajnoczi's avatar
    threadpool: drop global thread pool · c4d9d196
    Stefan Hajnoczi authored
    
    
    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: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c4d9d196