iothread: make IOThread struct definition public
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>
This commit is contained in:
parent
4d1cb6e6f5
commit
8c2664d869
@ -15,10 +15,20 @@
|
|||||||
#define IOTHREAD_H
|
#define IOTHREAD_H
|
||||||
|
|
||||||
#include "block/aio.h"
|
#include "block/aio.h"
|
||||||
|
#include "qemu/thread.h"
|
||||||
|
|
||||||
#define TYPE_IOTHREAD "iothread"
|
#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) \
|
#define IOTHREAD(obj) \
|
||||||
OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD)
|
OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD)
|
||||||
|
11
iothread.c
11
iothread.c
@ -14,7 +14,6 @@
|
|||||||
#include "qom/object.h"
|
#include "qom/object.h"
|
||||||
#include "qom/object_interfaces.h"
|
#include "qom/object_interfaces.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "qemu/thread.h"
|
|
||||||
#include "block/aio.h"
|
#include "block/aio.h"
|
||||||
#include "sysemu/iothread.h"
|
#include "sysemu/iothread.h"
|
||||||
#include "qmp-commands.h"
|
#include "qmp-commands.h"
|
||||||
@ -22,16 +21,6 @@
|
|||||||
#define IOTHREADS_PATH "/objects"
|
#define IOTHREADS_PATH "/objects"
|
||||||
|
|
||||||
typedef ObjectClass IOThreadClass;
|
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) \
|
#define IOTHREAD_GET_CLASS(obj) \
|
||||||
OBJECT_GET_CLASS(IOThreadClass, obj, TYPE_IOTHREAD)
|
OBJECT_GET_CLASS(IOThreadClass, obj, TYPE_IOTHREAD)
|
||||||
|
Loading…
Reference in New Issue
Block a user