From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2A70B3858D1E for ; Mon, 10 Apr 2023 18:43:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A70B3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plwUO-0006q0-Mn; Mon, 10 Apr 2023 14:43:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=tUWRoJ+3KpNRnDH7e6a96Z/TzuzVYTbnxk4cNQTlMr4=; b=RZIxXJera0DwhQub0wR2 UCA9mebLzDy0d/KuBoscoNH/gsw420RKLYE9HJFJrfJjt3dl8ml1fw8k4VzbRqH3UzKzwUIkNwLJy ZMvXxGwKsiR/O4H3PI2mGk37OEuZv70fBMoPxnayh+LvadLUN7rZo0dcWYnNX4RgLbnyb2VayjSPN gAGJDSYQivJmJSN5drhhzSExNEOZG5ZeiC4un7cbIqxMnHSV+B0TZSOMN27VfySJdAPRX3dFcA+Rs fmRdHy9L6C25oV65YQOey/dhPO7RK7fUpiSLLvP59LuYDMNrfkBYmbM3sodSkne6KoVNgTTH/k4vB /h10cahc/6uoPg==; Received: from [2a01:cb19:4a:a400:de41:a9ff:fe47:ec49] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plwTf-0005Gc-IE; Mon, 10 Apr 2023 14:43:13 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1plwTe-0000hs-18; Mon, 10 Apr 2023 20:42:54 +0200 Date: Mon, 10 Apr 2023 20:42:54 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: Re: [PATCH v2 18.1/34] hurd: Do not declare local variables volatile Message-ID: <20230410184254.u7e4xtmit2tey6rl@begin> Mail-Followup-To: Sergey Bugaev , bug-hurd@gnu.org, libc-alpha@sourceware.org References: <20230319151017.531737-19-bugaevc@gmail.com> <20230403115621.258636-1-bugaevc@gmail.com> <20230403115621.258636-2-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230403115621.258636-2-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied, thanks! Sergey Bugaev, le lun. 03 avril 2023 14:56:20 +0300, a ecrit: > These are just regular local variables that are not accessed in any > funny ways, not even though a pointer. There's absolutely no reason to > declare them volatile. It only ends up hurting the quality of the > generated machine code. > > If anything, it would make sense to decalre sigsp as *pointing* to > volatile memory (volatile void *sigsp), but evidently that's not needed > either. > > Signed-off-by: Sergey Bugaev > --- > hurd/trampoline.c | 2 +- > sysdeps/mach/hurd/i386/trampoline.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hurd/trampoline.c b/hurd/trampoline.c > index 5bd8dec9..1447b13f 100644 > --- a/hurd/trampoline.c > +++ b/hurd/trampoline.c > @@ -29,7 +29,7 @@ struct sigcontext * > _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action, > __sighandler_t handler, > int signo, struct hurd_signal_detail *detail, > - volatile int rpc_wait, > + int rpc_wait, > struct machine_thread_all_state *state) > { > #error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c" > diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c > index ab67fb9c..9cd60b9c 100644 > --- a/sysdeps/mach/hurd/i386/trampoline.c > +++ b/sysdeps/mach/hurd/i386/trampoline.c > @@ -83,13 +83,13 @@ struct sigcontext * > _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action, > __sighandler_t handler, > int signo, struct hurd_signal_detail *detail, > - volatile int rpc_wait, > + int rpc_wait, > struct machine_thread_all_state *state) > { > void trampoline (void); > void rpc_wait_trampoline (void); > void firewall (void); > - void *volatile sigsp; > + void *sigsp; > struct sigcontext *scp; > struct > { > -- > 2.39.2 > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.