From: Matt Birkholz Date: Fri, 5 Dec 2014 00:12:57 +0000 (-0700) Subject: smp: share: avltree.o X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0fe9b228a9c80ebd8dac19cbc190060001cda9f0;p=mit-scheme.git smp: share: avltree.o --- diff --git a/README.txt b/README.txt index acd136bbc..71978046c 100644 --- a/README.txt +++ b/README.txt @@ -180,9 +180,11 @@ command line. The remaining 12 belong to the 7 microcode modules and artutl.o: avltree.o: - 00000008 b bias.4380 - 00000000 B tree_error_message - 00000004 B tree_error_noise + 00000008 b bias.4380 __thread + 00000000 B tree_error_message __thread + 00000004 B tree_error_noise __thread + + OK. All state is thread-local now. bkpt.o: 00000004 b One_Before diff --git a/src/microcode/avltree.c b/src/microcode/avltree.c index 25761dbbe..ff7e19204 100644 --- a/src/microcode/avltree.c +++ b/src/microcode/avltree.c @@ -32,8 +32,8 @@ USA. extern int strcmp_ci (const char *, const char *); -const char * tree_error_message = 0; -const char * tree_error_noise = 0; +__thread const char * tree_error_message = 0; +__thread const char * tree_error_noise = 0; static void tree_error (const char * message, const char * noise) @@ -191,7 +191,7 @@ tree_lookup (tree_node tree, const char * name) tree_node tree_build (unsigned long high, const char ** names, unsigned long value) { - static long bias = 0; + static __thread long bias = 0; if (high > 1) { tree_node tree; diff --git a/src/microcode/avltree.h b/src/microcode/avltree.h index 2bf736754..a23240656 100644 --- a/src/microcode/avltree.h +++ b/src/microcode/avltree.h @@ -34,8 +34,8 @@ USA. #include "config.h" -extern const char * tree_error_message; -extern const char * tree_error_noise; +extern __thread const char * tree_error_message; +extern __thread const char * tree_error_noise; typedef struct tree_node_s * tree_node;