diff options
| author | mig <mig> | 2011-03-22 10:52:03 (GMT) |
|---|---|---|
| committer | mig <mig> | 2011-03-22 10:52:03 (GMT) |
| commit | fcaa62972e36ddeee0c2b9b65ffa3bc8dc706fed (patch) | |
| tree | 7d1593b65a0e52d5a300fdf169d7be296f4c9578 /generic/tclThreadAlloc.c | |
| parent | 636f952131cfd62f012576f5f7f56d5ebaefbcaf (diff) | |
| download | tcl-fcaa62972e36ddeee0c2b9b65ffa3bc8dc706fed.zip tcl-fcaa62972e36ddeee0c2b9b65ffa3bc8dc706fed.tar.gz tcl-fcaa62972e36ddeee0c2b9b65ffa3bc8dc706fed.tar.bz2 | |
simpler initialization of Cache under HAVE_FAST_TSD, from mig-alloc-reform.
Diffstat (limited to 'generic/tclThreadAlloc.c')
| -rwxr-xr-x | generic/tclThreadAlloc.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) |
