summaryrefslogtreecommitdiffstats
path: root/hw/9pfs/virtio-9p-coth.h
diff options
context:
space:
mode:
authorPaolo Bonzini2015-11-27 12:43:06 +0100
committerGreg Kurz2015-11-30 12:36:12 +0100
commitebac1202c95a4f1b76b6ef3f0f63926fa76e753e (patch)
treedade9efdf1badf5572f9738601b2c4d64f9c97a7 /hw/9pfs/virtio-9p-coth.h
parentfsdev-proxy-helper: avoid TOC/TOU race (diff)
downloadqemu-ebac1202c95a4f1b76b6ef3f0f63926fa76e753e.tar.gz
qemu-ebac1202c95a4f1b76b6ef3f0f63926fa76e753e.tar.xz
qemu-ebac1202c95a4f1b76b6ef3f0f63926fa76e753e.zip
virtio-9p: use QEMU thread pool
The QEMU thread pool already has a mechanism to invoke callbacks in the main thread. It does not need an EventNotifier and it is more efficient too. Use it instead of GAsyncQueue + GThreadPool + glue. As a side effect, it silences Coverity's complaint about an unchecked return value for event_notifier_init. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com> (removed no more needed #include <glib.h> from virtio-9p-coth.h) Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p-coth.h')
-rw-r--r--hw/9pfs/virtio-9p-coth.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/9pfs/virtio-9p-coth.h b/hw/9pfs/virtio-9p-coth.h
index 0fbe49a946..4ac1aaf902 100644
--- a/hw/9pfs/virtio-9p-coth.h
+++ b/hw/9pfs/virtio-9p-coth.h
@@ -18,14 +18,6 @@
#include "qemu/thread.h"
#include "qemu/coroutine.h"
#include "virtio-9p.h"
-#include <glib.h>
-
-typedef struct V9fsThPool {
- EventNotifier e;
-
- GThreadPool *pool;
- GAsyncQueue *completed;
-} V9fsThPool;
/*
* we want to use bottom half because we want to make sure the below
@@ -45,7 +37,7 @@ typedef struct V9fsThPool {
qemu_bh_schedule(co_bh); \
/* \
* yield in qemu thread and re-enter back \
- * in glib worker thread \
+ * in worker thread \
*/ \
qemu_coroutine_yield(); \
qemu_bh_delete(co_bh); \