diff options
author | mig <mig> | 2011-03-22 10:52:03 (GMT) |
---|---|---|
committer | mig <mig> | 2011-03-22 10:52:03 (GMT) |
commit | 95f9acf8cd7767e4e519e48f3e7c2946a20f4381 (patch) | |
tree | 7d1593b65a0e52d5a300fdf169d7be296f4c9578 | |
parent | 7b4f943fc3bedea88294051a95afb93a103143d8 (diff) | |
download | tcl-95f9acf8cd7767e4e519e48f3e7c2946a20f4381.zip tcl-95f9acf8cd7767e4e519e48f3e7c2946a20f4381.tar.gz tcl-95f9acf8cd7767e4e519e48f3e7c2946a20f4381.tar.bz2 |
simpler initialization of Cache under HAVE_FAST_TSD, from mig-alloc-reform.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | generic/tclThreadAlloc.c | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -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) |