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:
authorCorinna Vinschen <corinna@vinschen.de>2014-07-21 20:32:09 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-07-21 20:32:09 +0400
commit3be2cd04054844e63d05ace2f31b90f8c76ff925 (patch)
tree156c2197396905cb909d798a9824bbcfa4929009
parent7cc124b0e5cefbe90e23a4477ce99c70adb6ce8d (diff)
* thread.cc (pthread::init_mainthread): Initialize thread mutex to
type PTHREAD_MUTEX_RECURSIVE, just as for any other thread.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/thread.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2e315c7c2..93896c88c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+ * thread.cc (pthread::init_mainthread): Initialize thread mutex to
+ type PTHREAD_MUTEX_RECURSIVE, just as for any other thread.
+
+2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 32.
2014-07-21 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index fc70c3752..dc4faac7c 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -358,6 +358,10 @@ pthread::init_mainthread ()
if (!thread->create_cancel_event ())
api_fatal ("couldn't create cancel event for main thread");
VerifyHandle (thread->win32_obj_id);
+ /* Make sure the pthread mutex is recursive. See comment in
+ pthread::precreate (called only for subsequent pthreads)
+ for a description. */
+ thread->mutex.set_type (PTHREAD_MUTEX_RECURSIVE);
thread->postcreate ();
}