From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-block@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 1/3] aio: Move AioHandler struct to header
Date: Mon, 12 Oct 2015 17:55:29 +0800 [thread overview]
Message-ID: <1444643731-15346-2-git-send-email-famz@redhat.com> (raw)
In-Reply-To: <1444643731-15346-1-git-send-email-famz@redhat.com>
AioHandler for win32 is a superset of the counterpart in aio-posix, move that
to a new header "aio-internal.h" and drop the posix variation.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
aio-posix.c | 11 +----------
aio-win32.c | 12 +-----------
include/block/aio-internal.h | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+), 21 deletions(-)
create mode 100644 include/block/aio-internal.h
diff --git a/aio-posix.c b/aio-posix.c
index d477033..7ae54fc 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -17,16 +17,7 @@
#include "block/block.h"
#include "qemu/queue.h"
#include "qemu/sockets.h"
-
-struct AioHandler
-{
- GPollFD pfd;
- IOHandler *io_read;
- IOHandler *io_write;
- int deleted;
- void *opaque;
- QLIST_ENTRY(AioHandler) node;
-};
+#include "block/aio-internal.h"
static AioHandler *find_aio_handler(AioContext *ctx, int fd)
{
diff --git a/aio-win32.c b/aio-win32.c
index 50a6867..f018934 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -19,17 +19,7 @@
#include "block/block.h"
#include "qemu/queue.h"
#include "qemu/sockets.h"
-
-struct AioHandler {
- EventNotifier *e;
- IOHandler *io_read;
- IOHandler *io_write;
- EventNotifierHandler *io_notify;
- GPollFD pfd;
- int deleted;
- void *opaque;
- QLIST_ENTRY(AioHandler) node;
-};
+#include "block/aio-internal.h"
void aio_set_fd_handler(AioContext *ctx,
int fd,
diff --git a/include/block/aio-internal.h b/include/block/aio-internal.h
new file mode 100644
index 0000000..2ffbcdc
--- /dev/null
+++ b/include/block/aio-internal.h
@@ -0,0 +1,30 @@
+/*
+ * QEMU aio internal interface
+ *
+ * Copyright Red Hat, Inc. 2015
+ *
+ * Authors:
+ * Fam Zheng <famz@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_AIO_INTERNAL_H
+#define QEMU_AIO_INTERNAL_H
+
+#include "block/aio.h"
+
+struct AioHandler {
+ EventNotifier *e;
+ IOHandler *io_read;
+ IOHandler *io_write;
+ EventNotifierHandler *io_notify;
+ GPollFD pfd;
+ int deleted;
+ void *opaque;
+ QLIST_ENTRY(AioHandler) node;
+};
+
+#endif
--
2.6.1
next prev parent reply other threads:[~2015-10-12 9:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 9:55 [Qemu-devel] [PATCH 0/3] aio: Use epoll in aio_poll() Fam Zheng
2015-10-12 9:55 ` Fam Zheng [this message]
2015-10-12 9:55 ` [Qemu-devel] [PATCH 2/3] aio: Introduce aio_context_setup Fam Zheng
2015-10-12 9:55 ` [Qemu-devel] [PATCH 3/3] aio: Introduce aio-epoll.c Fam Zheng
2015-10-12 10:06 ` Paolo Bonzini
2015-10-12 11:24 ` Fam Zheng
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=1444643731-15346-2-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).