]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Do not declare local variables volatile
authorSergey Bugaev <bugaevc@gmail.com>
Mon, 3 Apr 2023 11:56:20 +0000 (14:56 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 10 Apr 2023 18:42:28 +0000 (20:42 +0200)
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>

hurd/trampoline.c
sysdeps/mach/hurd/i386/trampoline.c

index 5bd8dec9199203f026015dfd595740c661f89f78..1447b13fe6cee33fd27a6d3e9aa1c1c7ca2c854f 100644 (file)
@@ -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"
index ab67fb9cd27bbfebc78d8820b14ef3c6460d72c0..9cd60b9c8f31bf403a3c1df8457bea3aa1ef7628 100644 (file)
@@ -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
     {