]> git.proxmox.com Git - qemu.git/commitdiff
aio / timers: Consistent treatment of disabled clocks for deadlines
authorAlex Bligh <alex@alex.org.uk>
Wed, 21 Aug 2013 15:02:42 +0000 (16:02 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 22 Aug 2013 13:58:05 +0000 (15:58 +0200)
Make treatment of disabled clocks consistent in deadline calculation

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-timer.c

index df8f12b3dbb2826fc584cbee159902b952459f2d..be29adf9ebad0bbddaaca8b871c9d13c3a342367 100644 (file)
@@ -264,7 +264,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock)
     /* To avoid problems with overflow limit this to 2^32.  */
     int64_t delta = INT32_MAX;
 
-    if (clock->active_timers) {
+    if (clock->enabled && clock->active_timers) {
         delta = clock->active_timers->expire_time - qemu_get_clock_ns(clock);
     }
     if (delta < 0) {