summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-03-10 11:38:46 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-17 11:14:53 -0500
commit8c04ba55f91c8379c512d12d121cc9c1e1f9c755 (patch)
tree519b51eb41c8a71aa55d661206631f04cd6c26da
parentb6964827541afbf9c3aa246737ae3d17aaf19869 (diff)
downloadfocaccia-qemu-8c04ba55f91c8379c512d12d121cc9c1e1f9c755.tar.gz
focaccia-qemu-8c04ba55f91c8379c512d12d121cc9c1e1f9c755.zip
change qemu_run_timers interface
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--vl.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/vl.c b/vl.c
index 5d1a3910a2..bcd54f2221 100644
--- a/vl.c
+++ b/vl.c
@@ -903,10 +903,13 @@ int qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time)
     return (timer_head->expire_time <= current_time);
 }
 
-static void qemu_run_timers(QEMUTimer **ptimer_head, int64_t current_time)
+static void qemu_run_timers(QEMUClock *clock)
 {
-    QEMUTimer *ts;
+    QEMUTimer **ptimer_head, *ts;
+    int64_t current_time;
 
+    current_time = qemu_get_clock (clock);
+    ptimer_head = &active_timers[clock->type];
     for(;;) {
         ts = *ptimer_head;
         if (!ts || ts->expire_time > current_time)
@@ -1015,16 +1018,11 @@ static void qemu_run_all_timers(void)
     /* vm time timers */
     if (vm_running) {
         if (!cur_cpu || likely(!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)))
-            qemu_run_timers(&active_timers[QEMU_CLOCK_VIRTUAL],
-                            qemu_get_clock(vm_clock));
+            qemu_run_timers(vm_clock);
     }
 
-    /* real time timers */
-    qemu_run_timers(&active_timers[QEMU_CLOCK_REALTIME],
-                    qemu_get_clock(rt_clock));
-
-    qemu_run_timers(&active_timers[QEMU_CLOCK_HOST],
-                    qemu_get_clock(host_clock));
+    qemu_run_timers(rt_clock);
+    qemu_run_timers(host_clock);
 }
 
 #ifdef _WIN32