]> sourceware.org Git - newlib-cygwin.git/commitdiff
2002-10-01 Robert Collins <rbtcollins@hotmail.com>
authorRobert Collins <rbtcollins@hotmail.com>
Mon, 30 Sep 2002 21:06:05 +0000 (21:06 +0000)
committerRobert Collins <rbtcollins@hotmail.com>
Mon, 30 Sep 2002 21:06:05 +0000 (21:06 +0000)
        * thread.cc (pthread_key::keys): Copy on fork. Add a comment explaining
        why.
        (pthreadNull::_instance): Copy on fork. Absolutely no state exists
        in pthreadNull.

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

index b804b8fce57600c25726411630e30ef197eb3780..077d43b8ebf6e9bbfeccd4cb11b3335779dd380e 100644 (file)
@@ -1,3 +1,10 @@
+2002-10-01  Robert Collins <rbtcollins@hotmail.com>
+
+       * thread.cc (pthread_key::keys): Copy on fork. Add a comment explaining
+       why.
+       (pthreadNull::_instance): Copy on fork. Absolutely no state exists
+       in pthreadNull. 
+
 2002-09-30  Conrad Scott  <conrad.scott@dsl.pipex.com>
 
        * cygserver_transport_pipes.cc (transport_layer_pipes::accept):
index 8c1213a767d9c914202a01079d103935963063c3..1ccebb24ba10d9aa12f9ef5d768593909188dba7 100644 (file)
@@ -190,7 +190,7 @@ MTinterface::Init (int forked)
   threadcount = 1; /* 1 current thread when Init occurs.*/
 
   pthread::initMainThread (&mainthread, myself->hProcess);
-  pthread_mutex::initMutex ();
+  pthread_mutex::initMutex ();  
 
   if (forked)
     return;
@@ -935,7 +935,8 @@ pthread_cond::fixup_after_fork ()
 
 /* pthread_key */
 /* static members */
-List<pthread_key> pthread_key::keys NO_COPY;
+/* This stores pthread_key information across fork() boundaries */
+List<pthread_key> pthread_key::keys;
 
 void
 pthread_key::saveAKey (pthread_key *key)
@@ -1097,6 +1098,7 @@ pthread_mutex::isGoodInitializerOrObject (pthread_mutex_t const *mutex)
   return true;
 }
 
+/* This is used for mutex creation protection within a single process only */
 pthread_mutex::nativeMutex pthread_mutex::mutexInitializationLock NO_COPY;
 
 /* We can only be called once.
@@ -2640,6 +2642,6 @@ pthreadNull::getsequence_np ()
   return 0;
 }
 
-pthreadNull NO_COPY pthreadNull::_instance;
+pthreadNull pthreadNull::_instance;
 
 #endif // MT_SAFE
This page took 0.041968 seconds and 5 git commands to generate.