]> git.proxmox.com Git - qemu.git/blobdiff - async.c
target-m68k: Move TCG initialization to M68kCPU initfn
[qemu.git] / async.c
diff --git a/async.c b/async.c
index 04f9dcbb4d07cc4015f54ffdd5aa8c6f44c3d9cd..72d268ae352510c0c0ca49a43e05d197e23c0d98 100644 (file)
--- a/async.c
+++ b/async.c
@@ -23,8 +23,8 @@
  */
 
 #include "qemu-common.h"
-#include "qemu-aio.h"
-#include "main-loop.h"
+#include "block/aio.h"
+#include "qemu/main-loop.h"
 
 /***********************************************************/
 /* bottom halves (can be seen as timers which expire ASAP) */
@@ -122,11 +122,9 @@ aio_ctx_prepare(GSource *source, gint    *timeout)
 {
     AioContext *ctx = (AioContext *) source;
     QEMUBH *bh;
-    bool scheduled = false;
 
     for (bh = ctx->first_bh; bh; bh = bh->next) {
         if (!bh->deleted && bh->scheduled) {
-            scheduled = true;
             if (bh->idle) {
                 /* idle bottom halves will be polled at least
                  * every 10ms */
@@ -135,12 +133,12 @@ aio_ctx_prepare(GSource *source, gint    *timeout)
                 /* non-idle bottom halves will be executed
                  * immediately */
                 *timeout = 0;
-                break;
+                return true;
             }
         }
     }
 
-    return scheduled;
+    return false;
 }
 
 static gboolean
@@ -217,8 +215,3 @@ void aio_context_unref(AioContext *ctx)
 {
     g_source_unref(&ctx->source);
 }
-
-void aio_flush(AioContext *ctx)
-{
-    while (aio_poll(ctx, true));
-}