Received: from eggs.gnu.org ([2001:4830:134:3::10]:40035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW9mh-0007Zt-4y for qemu-devel@nongnu.org; Fri, 04 Apr 2014 15:28:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WW9ma-0007hS-AM for qemu-devel@nongnu.org; Fri, 04 Apr 2014 15:28:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW9ma-0007h8-18 for qemu-devel@nongnu.org; Fri, 04 Apr 2014 15:28:08 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s34JS76Y016184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Apr 2014 15:28:07 -0400 From: Kevin Wolf Date: Fri, 4 Apr 2014 21:27:48 +0200 Message-Id: <1396639669-24348-10-git-send-email-kwolf@redhat.com> In-Reply-To: <1396639669-24348-1-git-send-email-kwolf@redhat.com> References: <1396639669-24348-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 09/10] iothread: make IOThread struct definition public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Stefan Hajnoczi Make the IOThread struct definition public so objects can be embedded in parent structs. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Tested-by: Christian Borntraeger Signed-off-by: Kevin Wolf --- include/sysemu/iothread.h | 12 +++++++++++- iothread.c | 11 ----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index a32214a..7c01a61 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -15,10 +15,20 @@ #define IOTHREAD_H #include "block/aio.h" +#include "qemu/thread.h" #define TYPE_IOTHREAD "iothread" -typedef struct IOThread IOThread; +typedef struct { + Object parent_obj; + + QemuThread thread; + AioContext *ctx; + QemuMutex init_done_lock; + QemuCond init_done_cond; /* is thread initialization done? */ + bool stopping; + int thread_id; +} IOThread; #define IOTHREAD(obj) \ OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD) diff --git a/iothread.c b/iothread.c index cb5986b..1fbf9f1 100644 --- a/iothread.c +++ b/iothread.c @@ -14,7 +14,6 @@ #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu/module.h" -#include "qemu/thread.h" #include "block/aio.h" #include "sysemu/iothread.h" #include "qmp-commands.h" @@ -22,16 +21,6 @@ #define IOTHREADS_PATH "/objects" typedef ObjectClass IOThreadClass; -struct IOThread { - Object parent_obj; - - QemuThread thread; - AioContext *ctx; - QemuMutex init_done_lock; - QemuCond init_done_cond; /* is thread initialization done? */ - bool stopping; - int thread_id; -}; #define IOTHREAD_GET_CLASS(obj) \ OBJECT_GET_CLASS(IOThreadClass, obj, TYPE_IOTHREAD) -- 1.8.3.1