提交 c9299e2f 编写于 作者: S Sergey Fedorov 提交者: Paolo Bonzini

qtest: fix qtest_clock_warp() for no deadline case

Use dedicated qemu_soonest_timeout() instead of MIN().
Signed-off-by: NSergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 a656e22f
......@@ -347,7 +347,7 @@ void qtest_clock_warp(int64_t dest)
assert(qtest_enabled());
while (clock < dest) {
int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);
int64_t warp = MIN(dest - clock, deadline);
int64_t warp = qemu_soonest_timeout(dest - clock, deadline);
seqlock_write_lock(&timers_state.vm_clock_seqlock);
qemu_icount_bias += warp;
seqlock_write_unlock(&timers_state.vm_clock_seqlock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册