qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	alex@alex.org.uk, rth@twiddle.net
Subject: [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments
Date: Fri,  5 Jul 2013 14:39:44 +0200	[thread overview]
Message-ID: <1373027986-17868-2-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1373027986-17868-1-git-send-email-stefanha@redhat.com>

host_alarm_handler() may be invoked as a signal handler.  Previously we
did more processing in the signal handler and therefore needed
signal-safe timer code.

Today host_alarm_handler() just marks the alarm timer as expired/pending
and notifies the main loop using qemu_notify_event().

Therefore these outdated comments about signal safety can be dropped.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 qemu-timer.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/qemu-timer.c b/qemu-timer.c
index b2d95e2..4740da9 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -300,8 +300,6 @@ void qemu_del_timer(QEMUTimer *ts)
 {
     QEMUTimer **pt, *t;
 
-    /* NOTE: this code must be signal safe because
-       qemu_timer_expired() can be called from a signal. */
     pt = &ts->clock->active_timers;
     for(;;) {
         t = *pt;
@@ -324,8 +322,6 @@ void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time)
     qemu_del_timer(ts);
 
     /* add the timer in the sorted list */
-    /* NOTE: this code must be signal safe because
-       qemu_timer_expired() can be called from a signal. */
     pt = &ts->clock->active_timers;
     for(;;) {
         t = *pt;
-- 
1.8.1.4

  reply	other threads:[~2013-07-05 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 12:39 [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe Stefan Hajnoczi
2013-07-05 12:39 ` Stefan Hajnoczi [this message]
2013-07-05 17:52   ` [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373027986-17868-2-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=alex@alex.org.uk \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).