From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvARm-0000o3-7j for qemu-devel@nongnu.org; Fri, 05 Jul 2013 14:09:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvARk-0005QO-SX for qemu-devel@nongnu.org; Fri, 05 Jul 2013 14:09:30 -0400 Received: from david.siemens.de ([192.35.17.14]:34135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvABF-0008Gw-8o for qemu-devel@nongnu.org; Fri, 05 Jul 2013 13:52:25 -0400 Message-ID: <51D707D4.5090906@siemens.com> Date: Fri, 05 Jul 2013 19:52:20 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1373027986-17868-1-git-send-email-stefanha@redhat.com> <1373027986-17868-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1373027986-17868-2-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, alex@alex.org.uk, rth@twiddle.net On 2013-07-05 14:39, Stefan Hajnoczi wrote: > 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. Signal handlers run in the context of the signal processing thread, i.e. the iothread so far. > > 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 > --- > 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; > If you fix the imprecision in the log: Reviewed-by: Jan Kiszka Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux