提交 043a7e1f 编写于 作者: A Alex Bligh 提交者: Stefan Hajnoczi

aio / timers: Consistent treatment of disabled clocks for deadlines

Make treatment of disabled clocks consistent in deadline calculation
Signed-off-by: NAlex Bligh <alex@alex.org.uk>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册