public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Do not declare local variables volatile
Date: Mon, 10 Apr 2023 18:42:51 +0000 (GMT)	[thread overview]
Message-ID: <20230410184251.844293858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=645da826bba8c37d834403a56dc94203052c2cee

commit 645da826bba8c37d834403a56dc94203052c2cee
Author: Sergey Bugaev <bugaevc@gmail.com>
Date:   Mon Apr 3 14:56:20 2023 +0300

    hurd: Do not declare local variables volatile
    
    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 <bugaevc@gmail.com>
    Message-Id: <20230403115621.258636-2-bugaevc@gmail.com>

Diff:
---
 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 5bd8dec919..1447b13fe6 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 ab67fb9cd2..9cd60b9c8f 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
     {

                 reply	other threads:[~2023-04-10 18:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230410184251.844293858D1E@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).