]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value to
authorChristopher Faylor <me@cgf.cx>
Tue, 7 Sep 2004 04:05:14 +0000 (04:05 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 7 Sep 2004 04:05:14 +0000 (04:05 +0000)
indicate that it is "special".
* thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
initialized so reset it to 0 before calling _reclaim_reent.

winsup/cygwin/ChangeLog
winsup/cygwin/cygtls.cc
winsup/cygwin/thread.cc

index 0153cd8f4a98138b1c029fa032dba1279bdd3d04..0dbabc812a0472c811dafa21fe6d04b02ce7207c 100644 (file)
@@ -1,3 +1,10 @@
+2004-09-07  Christopher Faylor  <cgf@timesys.com>
+
+       * cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value to
+       indicate that it is "special".
+       * thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
+       initialized so reset it to 0 before calling _reclaim_reent.
+
 2004-09-05  Christopher Faylor  <cgf@timesys.com>
 
        * include/cygwin/version.h: Bump DLL minor number to 12.
index d2db5eb2e6d2f948a3d8fe71cc4752c9f98c800a..a409fda0471d6bc4ccd70cc39846dbe7baad8339 100644 (file)
@@ -107,7 +107,7 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
          local_clib._stdin = _GLOBAL_REENT->_stdin;
          local_clib._stdout = _GLOBAL_REENT->_stdout;
          local_clib._stderr = _GLOBAL_REENT->_stderr;
-         local_clib.__sdidinit = _GLOBAL_REENT->__sdidinit;
+         local_clib.__sdidinit = _GLOBAL_REENT->__sdidinit ? -1 : 0;
          local_clib.__cleanup = _GLOBAL_REENT->__cleanup;
          local_clib.__sglue._niobs = 3;
          local_clib.__sglue._iobs = &_GLOBAL_REENT->__sf[0];
index 7ba7399b687c2bbfc62ebeea6adb78187f48f5ad..b6c2e94d5daaa7f5b3b41b942013dac12c5240a6 100644 (file)
@@ -355,6 +355,8 @@ pthread::exit (void *value_ptr)
       mutex.unlock ();
     }
 
+  if (_my_tls.local_clib.__sdidinit < 0)
+    _my_tls.local_clib.__sdidinit = 0;
   (_reclaim_reent) (_REENT);
 
 
This page took 0.035463 seconds and 5 git commands to generate.