Commit 043a7e1f authored by Alex Bligh's avatar Alex Bligh Committed by Stefan Hajnoczi

aio / timers: Consistent treatment of disabled clocks for deadlines

Make treatment of disabled clocks consistent in deadline calculation
Signed-off-by: default avatarAlex Bligh <alex@alex.org.uk>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 02a03a9f
...@@ -264,7 +264,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock) ...@@ -264,7 +264,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock)
/* To avoid problems with overflow limit this to 2^32. */ /* To avoid problems with overflow limit this to 2^32. */
int64_t delta = INT32_MAX; 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); delta = clock->active_timers->expire_time - qemu_get_clock_ns(clock);
} }
if (delta < 0) { if (delta < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment