-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This was first observed in winpthreads from trunk r6478.

ktietz claimed to have found some problems with mutex destruction, and
committed r6481, then r6482.
After hours of running glimagesink and digging highly verbose log
output, i came to a conclusion that r6482 is not a good idea, and that
winpthreads must only destroy mutexes that have zero references to them.

After that i went back to r6481 and found the reason why winpthreads
busylooped indefinitely. It locked the global spinlock, while trying
to ref a mutex before destroying it, and failed to release it.

The patch against r6481 is attached.

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJS/fWLAAoJEOs4Jb6SI2Cw3goIANLVGfqNM/5jUbK6GcoaqorC
yH8g8g/sjwYnjTY6d82OneirhyWrpBo7Z+rSCpEfvXIirh89qaEnC90TRJV3TfIP
NN1sX/OZbvciosOC115qYPt0WVehRS65tr49AB0ap+yC796NN0SfUGeXaJGpdzuV
kp7sGxR9VzDB6R3wu9dFISK1Lc6QPkoAtDCruzJEu5JGQxMNUjjtiA7KQMTfuil7
LQWv3hpRo1fXHBgSXQJFuRQpfCQ5hGvnYqacv+cE4tGjrlIjBlKPyaN29OOebqr4
8wTjzY+BFbrg7f08Tduw2nlO5iWKxpQJQtkp10Hf7zTHUW7QPdHGddYvk4HxKJk=
=M+5b
-----END PGP SIGNATURE-----
Index: src/mutex.c
===================================================================
--- src/mutex.c	(revision 6481)
+++ src/mutex.c	(working copy)
@@ -144,7 +144,7 @@
     else if (m_->valid != LIFE_MUTEX)
       r = EINVAL;
     else if (m_->busy)
-      return 0xbeef; /* Indicate we want to wait here.  */
+      r = 0xbeef; /* Indicate we want to wait here.  */
     else if (COND_LOCKED(m_))
       r = EBUSY;
     else
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to