From: Matt Birkholz Date: Fri, 5 Dec 2014 00:12:57 +0000 (-0700) Subject: Make avltree.o state thread-local. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a994f0bd1d247386d5fab878f8a23450ca13b970;p=mit-scheme.git Make avltree.o state thread-local. --- diff --git a/src/microcode/avltree.c b/src/microcode/avltree.c index e4bf2248e..982838e63 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 a28890cf9..ce1cb56b6 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;