diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/cygtls.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0153cd8..0dbabc8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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. diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index d2db5eb..a409fda 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -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]; diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 7ba7399..b6c2e94 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -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); |