Il 27/08/2013 10:23, Stefan Hajnoczi ha scritto:
Introduce QEMUTimerList-active_timers_lock to protect the linked list
of active timers. This allows qemu_timer_mod_ns() to be called from any
thread.
Note that vm_clock is not thread-safe and its use of
qemu_clock_has_timers() works fine
On Thu, Aug 29, 2013 at 12:00:12PM +0200, Paolo Bonzini wrote:
Il 27/08/2013 10:23, Stefan Hajnoczi ha scritto:
/* modify the current timer so that it will be fired when current_time
= expire_time. The corresponding callback will be called. */
void timer_mod_ns(QEMUTimer *ts, int64_t
On Tue, Aug 27, 2013 at 09:55:22AM +0100, Alex Bligh wrote:
On 27 Aug 2013, at 09:23, Stefan Hajnoczi wrote:
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index e4934dd..b58903b 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -115,6 +115,10 @@ static inline
Il 27/08/2013 10:55, Alex Bligh ha scritto:
+ * Note that this function should not be used when other threads also access
+ * the timer list. The return value may be outdated by the time it is acted
+ * upon.
+ *
I'm in two minds as to whether there is a problem with the comment or the
Introduce QEMUTimerList-active_timers_lock to protect the linked list
of active timers. This allows qemu_timer_mod_ns() to be called from any
thread.
Note that vm_clock is not thread-safe and its use of
qemu_clock_has_timers() works fine today but is also not thread-safe.
The purpose of this
On 27 Aug 2013, at 09:23, Stefan Hajnoczi wrote:
Introduce QEMUTimerList-active_timers_lock to protect the linked list
of active timers. This allows qemu_timer_mod_ns() to be called from any
thread.
Note that vm_clock is not thread-safe and its use of
qemu_clock_has_timers() works fine