Received: from eggs.gnu.org ([2001:4830:134:3::10]:59439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8ryL-0007Yx-D1 for qemu-devel@nongnu.org; Mon, 12 Aug 2013 09:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8ryG-0004r4-BL for qemu-devel@nongnu.org; Mon, 12 Aug 2013 09:15:45 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:53098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8ryG-0004qY-3D for qemu-devel@nongnu.org; Mon, 12 Aug 2013 09:15:40 -0400 Date: Mon, 12 Aug 2013 14:15:25 +0100 From: Alex Bligh Message-ID: <3988E4AC66C3899370311EB5@Ximines.local> In-Reply-To: <1376311769-29811-2-git-send-email-stefanha@redhat.com> References: <1376311769-29811-1-git-send-email-stefanha@redhat.com> <1376311769-29811-2-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-timer: drop outdated signal safety comments Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Paolo Bonzini , Ping Fan Liu , Alex Bligh --On 12 August 2013 14:49:28 +0200 Stefan Hajnoczi wrote: > host_alarm_handler() is invoked from the signal processing thread > (currently the iothread). Previously we did processing in a real signal > handler with signalfd 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 Reviewed-by: Alex Bligh > --- > qemu-timer.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/qemu-timer.c b/qemu-timer.c > index 5b9a722..818d235 100644 > --- a/qemu-timer.c > +++ b/qemu-timer.c > @@ -301,8 +301,6 @@ void timer_del(QEMUTimer *ts) > { > QEMUTimer **pt, *t; > > - /* NOTE: this code must be signal safe because > - timer_expired() can be called from a signal. */ > pt = &ts->timer_list->active_timers; > for(;;) { > t = *pt; > @@ -325,8 +323,6 @@ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) > timer_del(ts); > > /* add the timer in the sorted list */ > - /* NOTE: this code must be signal safe because > - timer_expired() can be called from a signal. */ > pt = &ts->timer_list->active_timers; > for(;;) { > t = *pt; > -- > 1.8.3.1 > > -- Alex Bligh