From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PULL 09/10] iothread: make IOThread struct definition public
Date: Fri, 4 Apr 2014 21:27:48 +0200 [thread overview]
Message-ID: <1396639669-24348-10-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1396639669-24348-1-git-send-email-kwolf@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
Make the IOThread struct definition public so objects can be embedded in
parent structs.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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
next prev parent reply other threads:[~2014-04-04 19:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 19:27 [Qemu-devel] [PULL 00/10] Block patches for 2.0 Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 01/10] iscsi: Don't set error if already set in iscsi_do_inquiry Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 02/10] qcow2: Flush metadata during read-only reopen Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 03/10] qcow2: Put cache reference in error case Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 04/10] block: Don't parse 'filename' option Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 05/10] qemu-iotests: Remove CR line endings in reference output Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 06/10] block: Fix snapshot=on for protocol parsed from filename Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 07/10] block: Check bdrv_getlength() return value in bdrv_append_temp_snapshot() Kevin Wolf
2014-04-04 19:27 ` [Qemu-devel] [PULL 08/10] dma-helpers: Initialize DMAAIOCB in_cancel flag Kevin Wolf
2014-04-04 19:27 ` Kevin Wolf [this message]
2014-04-04 19:27 ` [Qemu-devel] [PULL 10/10] dataplane: replace iothread object_add() with embedded instance Kevin Wolf
2014-04-05 9:50 ` [Qemu-devel] [PULL 00/10] Block patches for 2.0 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396639669-24348-10-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).