summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 00:06:54 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 00:06:54 +0000
commit423f0742a8483430fe031861c316b09f1967319d (patch)
treefcec9bdf0c53df28b1f6513f3b4d6256b41a1a14 /vl.c
parent0ff596d02fd9d876a31d038255a6d4f89da9dfed (diff)
downloadqemu-423f0742a8483430fe031861c316b09f1967319d.tar.gz
Add periodic timer implementation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2846 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 7dcfb58318..02c3c9cf79 100644
--- a/vl.c
+++ b/vl.c
@@ -6322,7 +6322,6 @@ void main_loop_wait(int timeout)
}
#endif
qemu_aio_poll();
- qemu_bh_poll();
if (vm_running) {
qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
@@ -6330,10 +6329,15 @@ void main_loop_wait(int timeout)
/* run dma transfers, if any */
DMA_run();
}
-
+
/* 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();
+
}
static CPUState *cur_cpu;