summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index ea0626142..9f8839fb1 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -213,6 +213,10 @@ void
MTinterface::fixup_after_fork (void)
{
pthread_key::fixup_after_fork ();
+
+ threadcount = 1;
+ pthread::initMainThread (true);
+
pthread_mutex *mutex = mutexs;
debug_printf ("mutexs is %x",mutexs);
while (mutex)
@@ -234,10 +238,6 @@ MTinterface::fixup_after_fork (void)
sem->fixup_after_fork ();
sem = sem->next;
}
-
- pthread::initMainThread (true);
-
- threadcount = 1;
}
/* pthread calls */