summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xgeneric/tclThreadAlloc.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5344725..07bcdf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-22 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclThreadAlloc.c: simpler initialization of Cache
+ under HAVE_FAST_TSD, from mig-alloc-reform.
+
2011-03-21 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tclLoadDl.c: [Bug #3216070] Loading extension libraries
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 18ae9cc..ad1d510 100755
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -148,13 +148,11 @@ static Cache *firstCachePtr = &sharedCache;
#if defined(HAVE_FAST_TSD)
static __thread Cache *tcachePtr;
-static __thread int allocInitialized = 0;
# define GETCACHE(cachePtr) \
do { \
- if (!allocInitialized) { \
- allocInitialized = 1; \
- tcachePtr = GetCache(); \
+ if (!tcachePtr) { \
+ tcachePtr = GetCache(); \
} \
(cachePtr) = tcachePtr; \
} while (0)