aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2011-04-28 16:40:42 +0300
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:43 +0100
commitd60bafe5d43fb00da8c7e0b3675351fae9a75670 (patch)
tree46b18a427df145e705895171f57afa79b73f7acc /Makefile
parentc1b3d8d86e5e587282f0dc24eebb46b365b49f20 (diff)
downloadkvmtool-d60bafe5d43fb00da8c7e0b3675351fae9a75670.tar.gz
kvm tools: Introduce generic I/O thread pool
This patch adds a generic pool to create a common interface for working with threads within the kvm tool. Main idea here is using this threadpool for all I/O threads instead of having every I/O module write it's own thread code. The process of working with the thread pool is supposed to be very simple. During initialization, each module which is interested in working with the threadpool will call threadpool__add_jobtype with the callback function and a void* parameter. For example, virtio modules will register every virt_queue as a new job type. During operation, When theres work to do for a specific job, the module will signal it to the queue and would expect the callback to be called with proper parameters. It is assured that the callback will be called once for every signal action and each callback will be called only once at a time (i.e. callback functions themselves don't need to handle threading). [ penberg@kernel.org: Use Lindent ] Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 17247ed9..bca9dba0 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,7 @@ OBJS += kvm-cmd.o
OBJS += kvm-run.o
OBJS += qcow.o
OBJS += mptable.o
+OBJS += threadpool.o
DEPS := $(patsubst %.o,%.d,$(OBJS))