From c8138f14f965ca14113af2dc59738c2403f2a9a7 Mon Sep 17 00:00:00 2001 From: tpfaff Date: Tue, 4 Mar 2003 20:16:49 +0000 Subject: [PATCH] * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread prior to pthread objects. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/thread.cc | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f1e9471b53..f9c4f1a5d9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-03-04 Thomas Pfaff + + * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread + prior to pthread objects. + 2003-03-04 Jason Tishler * fhandler_socket.cc (fhandler_socket::dup): Initialize type. diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index ea06261424..9f8839fb12 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 */ -- 2.11.0