qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC 2/4] aio: Move aio_set_fd_handler to async.c


From: Fam Zheng
Subject: [Qemu-devel] [PATCH RFC 2/4] aio: Move aio_set_fd_handler to async.c
Date: Tue, 30 Jun 2015 21:19:43 +0800

This function is now simply a wrapper for aio_set_fd_handler_pri, so
move it to host independent file.

Signed-off-by: Fam Zheng <address@hidden>
---
 aio-posix.c | 9 ---------
 aio-win32.c | 9 ---------
 async.c     | 9 +++++++++
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/aio-posix.c b/aio-posix.c
index f22657e..f516de1 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -42,15 +42,6 @@ static AioHandler *find_aio_handler(AioContext *ctx, int fd)
     return NULL;
 }
 
-void aio_set_fd_handler(AioContext *ctx,
-                        int fd,
-                        IOHandler *io_read,
-                        IOHandler *io_write,
-                        void *opaque)
-{
-    return aio_set_fd_handler_pri(ctx, fd, io_read, io_write, NULL, opaque);
-}
-
 void aio_set_fd_handler_pri(AioContext *ctx,
                             int fd,
                             IOHandler *io_read,
diff --git a/aio-win32.c b/aio-win32.c
index 016cc19..3c75896 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -31,15 +31,6 @@ struct AioHandler {
     QLIST_ENTRY(AioHandler) node;
 };
 
-void aio_set_fd_handler(AioContext *ctx,
-                        int fd,
-                        IOHandler *io_read,
-                        IOHandler *io_write,
-                        void *opaque)
-{
-    return aio_set_fd_handler_pri(ctx, fd, io_read, io_write, NULL, opaque);
-}
-
 void aio_set_fd_handler_pri(AioContext *ctx,
                             int fd,
                             IOHandler *io_read,
diff --git a/async.c b/async.c
index 77d080d..06971f4 100644
--- a/async.c
+++ b/async.c
@@ -328,3 +328,12 @@ void aio_context_release(AioContext *ctx)
 {
     rfifolock_unlock(&ctx->lock);
 }
+
+void aio_set_fd_handler(AioContext *ctx,
+                        int fd,
+                        IOHandler *io_read,
+                        IOHandler *io_write,
+                        void *opaque)
+{
+    return aio_set_fd_handler_pri(ctx, fd, io_read, io_write, NULL, opaque);
+}
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]