aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorSergey Fedorov <serge.fdrv@gmail.com>2014-06-10 13:10:28 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-06-17 16:07:37 +0200
commitc9299e2fe789b085f463b2e4232507f5e77f50b4 (patch)
treea16c277078536689a2c718322066fa9e0f0ec582 /cpus.c
parenta656e22f0993ca1d84cabf47a33e99f27acc3a28 (diff)
downloadqemu-arm-c9299e2fe789b085f463b2e4232507f5e77f50b4.tar.gz
qtest: fix qtest_clock_warp() for no deadline case
Use dedicated qemu_soonest_timeout() instead of MIN(). Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpus.c b/cpus.c
index dd7ac13621..af06dc0ae6 100644
--- a/cpus.c
+++ b/cpus.c
@@ -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);