From: Matt Birkholz Date: Sun, 19 Jul 2015 20:56:10 +0000 (-0700) Subject: Make uxsig.o state thread-local. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3b548af2381e62d49f524439eb8c0e9bb65cc27b;p=mit-scheme.git Make uxsig.o state thread-local. Most of this module's variables are read-only after initialization. Make blocked_signals and buffer thread-local. --- 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);