From 3b548af2381e62d49f524439eb8c0e9bb65cc27b Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 19 Jul 2015 13:56:10 -0700 Subject: [PATCH] Make uxsig.o state thread-local. Most of this module's variables are read-only after initialization. Make blocked_signals and buffer thread-local. --- src/microcode/uxsig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/microcode/uxsig.c b/src/microcode/uxsig.c index 1dc7fd303..66898237b 100644 --- a/src/microcode/uxsig.c +++ b/src/microcode/uxsig.c @@ -24,7 +24,7 @@ USA. */ -#include "scheme.h" +#include "prims.h" #include "option.h" #include "ux.h" #include "ossig.h" @@ -150,7 +150,7 @@ preserve_signal_mask (void) ((sizeof (sigset_t)), save_signal_mask, restore_signal_mask); } -static sigset_t blocked_signals; +static __thread sigset_t blocked_signals; void block_signals (void) @@ -295,7 +295,7 @@ find_signal_descriptor (int signo) const char * find_signal_name (int signo) { - static char buffer [32]; + static __thread char buffer [32]; struct signal_descriptor * descriptor = (find_signal_descriptor (signo)); if (descriptor != 0) return (descriptor -> name); -- 2.25.1