]> git.proxmox.com Git - mirror_qemu.git/commit
thread-pool: avoid passing the pool parameter every time
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Fri, 3 Feb 2023 13:17:31 +0000 (08:17 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Apr 2023 11:17:28 +0000 (13:17 +0200)
commitaef04fc79084fe340c931679413eb6070f2f13ca
tree8e1576f073221bc7e121c61982ce191876cd8db5
parent0fdb73112b6fb40af46a99e3251c340935a121ad
thread-pool: avoid passing the pool parameter every time

thread_pool_submit_aio() is always called on a pool taken from
qemu_get_current_aio_context(), and that is the only intended
use: each pool runs only in the same thread that is submitting
work to it, it can't run anywhere else.

Therefore simplify the thread_pool_submit* API and remove the
ThreadPool function parameter.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20230203131731.851116-5-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 files changed:
backends/tpm/tpm_backend.c
block/file-posix.c
block/file-win32.c
block/qcow2-threads.c
hw/9pfs/coth.c
hw/ppc/spapr_nvdimm.c
hw/virtio/virtio-pmem.c
include/block/thread-pool.h
scsi/pr-manager.c
scsi/qemu-pr-helper.c
tests/unit/test-thread-pool.c
util/thread-pool.c