From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0pMT-0004Mq-SM for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0pMT-0007KQ-1m for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:51:25 -0400 Received: from mail-ie0-x231.google.com ([2607:f8b0:4001:c03::231]:52121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0pMS-0007KJ-Tn for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:51:24 -0400 Received: by mail-ie0-f177.google.com with SMTP id w15so4448066iea.22 for ; Sun, 21 Jul 2013 01:51:24 -0700 (PDT) From: Liu Ping Fan Date: Sun, 21 Jul 2013 16:43:03 +0800 Message-Id: <1374396185-10870-7-git-send-email-pingfank@linux.vnet.ibm.com> In-Reply-To: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> References: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Jan Kiszka , Alex Bligh , Anthony Liguori , Paolo Bonzini Stop call timers in main loop and let each mini event-loop run its own timers. Signed-off-by: Liu Ping Fan --- aio-posix.c | 2 ++ main-loop.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index b68eccd..29c2769 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -191,6 +191,8 @@ bool aio_poll(AioContext *ctx, bool blocking) progress = true; } + qemu_run_all_timers(); + if (progress && !blocking) { return true; } diff --git a/main-loop.c b/main-loop.c index 4a94a52..46a98a3 100644 --- a/main-loop.c +++ b/main-loop.c @@ -467,8 +467,6 @@ int main_loop_wait(int nonblocking) slirp_pollfds_poll(gpollfds, (ret < 0)); #endif - qemu_run_all_timers(); - return ret; } -- 1.8.1.4