OSDN Git Service

* thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
authortpfaff <tpfaff>
Tue, 4 Mar 2003 20:16:49 +0000 (20:16 +0000)
committertpfaff <tpfaff>
Tue, 4 Mar 2003 20:16:49 +0000 (20:16 +0000)
prior to pthread objects.

winsup/cygwin/ChangeLog
winsup/cygwin/thread.cc

index f1e9471..f9c4f1a 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-04  Thomas Pfaff  <tpfaff@gmx.net>
+
+       * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
+       prior to pthread objects.
+       
 2003-03-04  Jason Tishler <jason@tishler.net>
 
        * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
index ea06261..9f8839f 100644 (file)
@@ -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 */