* thread.cc (pthread::init_mainthread): Initialize thread mutex to

type PTHREAD_MUTEX_RECURSIVE, just as for any other thread.
This commit is contained in:
Corinna Vinschen 2014-07-21 16:32:09 +00:00
parent 7cc124b0e5
commit 3be2cd0405
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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 ();
}