qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5636] Run timers from host alarm timer callback
@ 2008-11-05 21:04 Anthony Liguori
  2008-11-05 21:08 ` Anthony Liguori
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2008-11-05 21:04 UTC (permalink / raw)
  To: qemu-devel

Revision: 5636
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5636
Author:   aliguori
Date:     2008-11-05 21:04:35 +0000 (Wed, 05 Nov 2008)

Log Message:
-----------
Run timers from host alarm timer callback

This further cleans up the main loop getting it a lot closer to what a main
loop should be.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/vl.c

Modified: trunk/vl.c
===================================================================
--- trunk/vl.c	2008-11-05 20:49:37 UTC (rev 5635)
+++ trunk/vl.c	2008-11-05 21:04:35 UTC (rev 5636)
@@ -1700,6 +1700,15 @@
         len = read(alarm_timer_rfd, buffer, sizeof(buffer));
     } while ((len == -1 && errno == EINTR) || len > 0);
 
+    /* vm time timers */
+    if (vm_running && likely(!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)))
+        qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
+                        qemu_get_clock(vm_clock));
+
+    /* real time timers */
+    qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
+                    qemu_get_clock(rt_clock));
+
     if (t->flags & ALARM_FLAG_EXPIRED) {
         alarm_timer->flags &= ~ALARM_FLAG_EXPIRED;
         qemu_rearm_alarm_timer(alarm_timer);
@@ -4551,16 +4560,6 @@
     }
 #endif
 
-    if (vm_running) {
-        if (likely(!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)))
-        qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
-                        qemu_get_clock(vm_clock));
-    }
-
-    /* real time timers */
-    qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
-                    qemu_get_clock(rt_clock));
-
     /* Check bottom-halves last in case any of the earlier events triggered
        them.  */
     qemu_bh_poll();

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-11 23:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-05 21:04 [Qemu-devel] [5636] Run timers from host alarm timer callback Anthony Liguori
2008-11-05 21:08 ` Anthony Liguori
2008-11-07 11:52   ` Luis Pureza
2008-11-07 14:06     ` Anthony Liguori
2008-11-07 16:23       ` Paul Brook
2008-11-11 21:00       ` Anthony Liguori
2008-11-11 23:42         ` Luis Pureza

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).