summaryrefslogtreecommitdiffstats
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorAlex Bligh <alex@alex.org.uk>2013-08-21 16:02:42 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-08-22 15:58:05 +0200
commit043a7e1f8f66f3089ef0158aea00203e4591ba8d (patch)
tree4e8def9ececb6dbd2d5d99536446e2277756d6d1 /qemu-timer.c
parent02a03a9f12ec2fe68c9fed84fa8607a5326e2b65 (diff)
downloadhqemu-043a7e1f8f66f3089ef0158aea00203e4591ba8d.zip
hqemu-043a7e1f8f66f3089ef0158aea00203e4591ba8d.tar.gz
aio / timers: Consistent treatment of disabled clocks for deadlines
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>
Diffstat (limited to 'qemu-timer.c')
-rw-r--r--qemu-timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index df8f12b..be29adf 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -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) {
OpenPOWER on IntegriCloud