From 39c0564e00f85e70cc94de22035517b2f921d0a0 Mon Sep 17 00:00:00 2001 From: "Venkateswararao Jujjuri (JV)" Date: Sat, 23 Apr 2011 18:40:22 -0700 Subject: [virtio-9p] Add infrastructure to support glib threads and coroutines. This patch is originally made by Arun Bharadwaj for glib support. Later Harsh Prateek Bora added coroutines support. This version implemented with suggestions from Stefan Hajnoczi . Signed-off-by: Arun R Bharadwaj Signed-off-by: Harsh Prateek Bora Signed-off-by: Venkateswararao Jujjuri " Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hw/9pfs/virtio-9p-device.c') diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index f235236..f4bf471 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -18,6 +18,7 @@ #include "virtio-9p.h" #include "fsdev/qemu-fsdev.h" #include "virtio-9p-xattr.h" +#include "virtio-9p-coth.h" static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t features) { @@ -50,13 +51,11 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf) struct stat stat; FsTypeEntry *fse; - s = (V9fsState *)virtio_common_init("virtio-9p", VIRTIO_ID_9P, sizeof(struct virtio_9p_config)+ MAX_TAG_LEN, sizeof(V9fsState)); - /* initialize pdu allocator */ QLIST_INIT(&s->free_list); for (i = 0; i < (MAX_REQ - 1); i++) { @@ -132,6 +131,10 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf) s->tag_len; s->vdev.get_config = virtio_9p_get_config; + if (v9fs_init_worker_threads() < 0) { + fprintf(stderr, "worker thread initialization failed\n"); + exit(1); + } return &s->vdev; } -- cgit v1.1