Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 22db63683..9f0c97a58 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -91,10 +91,6 @@ _cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
_my_tls.init_thread (buf, func);
DWORD res = func (arg, buf);
_my_tls.remove (INFINITE);
- // FIXME: Need some sort of atthreadexit function to allow things like
- // select to control this themselves
- if (_my_tls.locals.exitsock != INVALID_SOCKET)
- closesocket (_my_tls.locals.exitsock);
ExitThread (res);
}
@@ -156,6 +152,10 @@ void
_cygtls::remove (DWORD wait)
{
debug_printf ("wait %p\n", wait);
+ // FIXME: Need some sort of atthreadexit function to allow things like
+ // select to control this themselves
+ if (_my_tls.locals.exitsock != INVALID_SOCKET)
+ closesocket (locals.exitsock);
do
{
sentry here (wait);