From patchwork Tue Aug 27 08:23:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 270062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 80A5D2C00C4 for ; Tue, 27 Aug 2013 18:24:57 +1000 (EST) Received: from localhost ([::1]:54814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEEa7-0006h5-Ld for incoming@patchwork.ozlabs.org; Tue, 27 Aug 2013 04:24:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEEZV-0006c6-Qt for qemu-devel@nongnu.org; Tue, 27 Aug 2013 04:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEEZP-0004Rv-S3 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 04:24:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEEZP-0004Rn-Kp for qemu-devel@nongnu.org; Tue, 27 Aug 2013 04:24:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7R8O4Ws009635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Aug 2013 04:24:04 -0400 Received: from localhost (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7R8O2UD015108; Tue, 27 Aug 2013 04:24:03 -0400 From: Stefan Hajnoczi To: Date: Tue, 27 Aug 2013 10:23:58 +0200 Message-Id: <1377591839-2743-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1377591839-2743-1-git-send-email-stefanha@redhat.com> References: <1377591839-2743-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , Ping Fan Liu , Stefan Hajnoczi , Alex Bligh Subject: [Qemu-devel] [PATCH v2 1/2] qemu-timer: drop outdated signal safety comments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Alex Bligh --- qemu-timer.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 95ff47f..ed3fcb2 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;