-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-02-26 20:13, schrieb Max TenEyck Woodbury:
In particular, user call back functions are being called in several places with this mutex held. If the callback starts another thread to do something graphical where the thread needs the mutex, and then waits for the thread to finish, both threads will hang until the mutex times out. There are also places where a function that takes out the mutex is called with the mutex already held. ddraw calls application-provided callback functions. A long time ago I did some testing on Windows, and it also uses a dll-global lock for ddraw and keeps it held when calling those callbacks. So we're doing the right thing here.
In case of d3d8/9, there are in theory the Resource's SetPrivateData, GetPrivateData and FreePrivateData functions that can call application code, specificly an IUnknown's AddRef and Release function. I have never tested how those behave wrt the dll lock. This thing can also be used to write a black-box test to see at which granularity Windows does d3d8/9 synchronization.
Switching to another terminal window and back again sometimes breaks these deadlocks. That seems wrong, unless we're accidentally holding those locks while sending window messages.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTDvMPAAoJEN0/YqbEcdMwg0kP/0VGijPb4vGV9iFAcYdA7P0j GGapgcXy8Iv5Mpf3aJodEK6awCB5aVYfTC90Qr1ys04WJSQqvN+GDL4+fu9189hf sO+pK2kXlPmpmPjTwisqiT31BZ+wAN+7llPbJXpTkMw6xwKl+lxq9jm81FUmNT5S 0zFhEFCwbrPfydHNKp9/5vUpFTZ4dt7vycUg7Be7ujqUnr+JKo9SGiOz5eDE3E9R CIR03JTg0wQitiekxcdbhSQ0K/mIg857WzCTWa+Lc0r/bij6Ebf6NQPI+oobbOJI 9GbeFhwcKtLppO6B075F82j07jyLiNVC+k19UtW4Dby0gLeOI458smcEy8zUVEk5 Rfwgbej7xpHirWpMOgy0B0UtIH1HQkMs8dTKa5XfyZGLyVkoj+wnsf1PXCIVbphZ VvCt6htV0PgDzlYMOpMaja0/yebfscRnY1nCHOdaYMtTMoGAfclRK/yMdVR8Q5tO joEqAMtG20NcpbIPgRc/ZFFj5S7lZH+NTdd5MYxy1CmC7+AZ3XrSShfSFzFSS0Z5 KrHGQ0Z28DbFdWOBlVZOfe38ffj82On++cRzKTyChLBU+g80ZRzfPJMQ+ZEdu9qz AY+inhWRfs84XM1GupRgxU0Jlih10KoXiVCTVzlMJDIQY8/Efd8dD3b7ewXRgsV3 GVQxXjBp2XqhGRaqcZPr =+HPs -----END PGP SIGNATURE-----