[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/21] implement win32 dynticks timer
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 02/21] implement win32 dynticks timer |
Date: |
Mon, 21 Feb 2011 09:43:21 +0100 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
qemu-timer.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index b0db780..e6b926b 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -1006,6 +1006,7 @@ static void win32_stop_timer(struct qemu_alarm_timer *t)
static void win32_rearm_timer(struct qemu_alarm_timer *t)
{
struct qemu_alarm_win32 *data = t->priv;
+ int nearest_delta_ms;
assert(alarm_has_dynticks(t));
if (!active_timers[QEMU_CLOCK_REALTIME] &&
@@ -1015,7 +1016,11 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t)
timeKillEvent(data->timerId);
- data->timerId = timeSetEvent(1,
+ nearest_delta_ms = (qemu_next_alarm_deadline() + 999999) / 1000000;
+ if (nearest_delta_ms < 1) {
+ nearest_delta_ms = 1;
+ }
+ data->timerId = timeSetEvent(nearest_delta_ms,
data->period,
host_alarm_handler,
(DWORD)t,
--
1.7.3.5
- [Qemu-devel] [PATCH uq/master 00/21] Win32 iothread support, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 01/21] unlock iothread during WaitForMultipleObjects, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 02/21] implement win32 dynticks timer,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 04/21] replace qemu_thread_equal API with qemu_thread_is_current, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 05/21] add win32 qemu-thread implementation, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 06/21] include qemu-thread.h early, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 03/21] use win32 timer queues, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 07/21] add assertions on the owner of a QemuMutex, Paolo Bonzini, 2011/02/21