]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commit
timers: the rearm function should be able to handle delta = INT64_MAX
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 15 May 2012 17:23:51 +0000 (17:23 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 15 May 2012 17:57:08 +0000 (17:57 +0000)
commitd142bd66c01d8b154d8aa0f06f3a968fa1e225e8
tree8d8ccfa6ede916b980a022ffd6f6080888946ea6
parentc9fe34cbfd3941d3613be6d83a9f237e9ce42651
timers: the rearm function should be able to handle delta = INT64_MAX

Fix win32_rearm_timer and mm_rearm_timer: they should be able to handle
INT64_MAX as a delta parameter without overflowing.
Also, the next deadline in ms should be calculated rounding down rather
than up (see unix_rearm_timer and dynticks_rearm_timer).

Finally ChangeTimerQueueTimer takes an unsigned long and timeSetEvent
takes an unsigned int as delta, so cast the ms delta to the appropriate
unsigned integer.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-timer.c