qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe
@ 2013-07-05 12:39 Stefan Hajnoczi
  2013-07-05 12:39 ` [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Stefan Hajnoczi @ 2013-07-05 12:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Anthony Liguori, Stefan Hajnoczi, alex, rth

This series makes the following functions thread-safe:

  qemu_mod_timer_ns()
  qemu_mod_timer()
  qemu_del_timer()
  qemu_timer_pending()

The following were already thread-safe:

  qemu_free_timer()
  qemu_new_timer()
  qemu_timer_expired()

Now it is possible to use QEMUTimer outside the QEMU global mutex.  Timer
callbacks are still invoked from the main loop.  If a thread wishes to run
timer callbacks it must use a thread-safe QEMUBH (which Ping Fan Liu is working
on).

Note that host_clock is not thread-safe because it keeps state and invokes
reset notifiers.  Device emulation threads mostly care about vm_clock, so this
is not a problem.

Stefan Hajnoczi (3):
  qemu-timer: drop outdated signal safety comments
  qemu-timer: add QEMUClock->active_timers list lock
  qemu-timer: add qemu_alarm_timer->timer_modified_lock

 qemu-timer.c | 129 +++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 90 insertions(+), 39 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-18  4:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 12:39 [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe Stefan Hajnoczi
2013-07-05 12:39 ` [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
2013-07-05 17:52   ` Jan Kiszka
2013-07-05 12:39 ` [Qemu-devel] [PATCH 2/3] qemu-timer: add QEMUClock->active_timers list lock Stefan Hajnoczi
2013-07-05 13:01   ` Paolo Bonzini
2013-07-05 12:39 ` [Qemu-devel] [PATCH 3/3] qemu-timer: add qemu_alarm_timer->timer_modified_lock Stefan Hajnoczi
2013-07-05 17:51 ` [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe Jan Kiszka
2013-07-15 12:45   ` Paolo Bonzini
2013-07-15 12:57     ` Jan Kiszka
2013-07-15 13:38       ` Paolo Bonzini
2013-07-18  4:00 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).