Skip to content

Commit

Permalink
iothread: make IOThread struct definition public
Browse files Browse the repository at this point in the history
Make the IOThread struct definition public so objects can be embedded in
parent structs.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
stefanhaRH authored and kevmw committed Apr 4, 2014
1 parent 4d1cb6e commit 8c2664d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 11 additions & 1 deletion include/sysemu/iothread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions iothread.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,13 @@
#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"

#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)
Expand Down

0 comments on commit 8c2664d

Please sign in to comment.