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:
authorThomas Pfaff <tpfaff@gmx.net>2003-03-04 23:16:49 +0300
committerThomas Pfaff <tpfaff@gmx.net>2003-03-04 23:16:49 +0300
commit88243328466f67e014a781e2d03212d93be6409c (patch)
tree52189fa65e104509f8332fe3219d3d5bf5d73eb6
parent12390bc40d383f64378813b4e698ffc7750d94e8 (diff)
* thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
prior to pthread objects.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/thread.cc8
2 files changed, 9 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f1e9471b5..f9c4f1a5d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
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 */