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:
authorRobert Collins <rbtcollins@hotmail.com>2002-10-01 01:06:05 +0400
committerRobert Collins <rbtcollins@hotmail.com>2002-10-01 01:06:05 +0400
commit404f35cb5cec4702c5f61049997f9f0661925e7a (patch)
tree312fab9ed217271857818856084e24f9bc3f69f8 /winsup/cygwin/thread.cc
parent18be975d30156bf2d0d8d19534826eea0fffd943 (diff)
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.
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 8c1213a76..1ccebb24b 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -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