diff options
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index 8dd15ad6e..e03175a1f 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -75,7 +75,8 @@ _cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf) remove (INFINITE); /* Don't call ExitThread on the main thread since we may have been dynamically loaded. */ - if (this != _main_tls) + if ((void *) func != (void *) dll_crt0_1 + && (void *) func != (void *) dll_dllcrt0_1) ExitThread (res); } |