mciavi: Prevent deadlock when closing while playing or when paused.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Thu Mar 11 02:26:48 CST 2010


Hi,

alas, even though mciavi contains lots of Critical Sections,
it's not enough to protect against 2 threads calling Play and Close
concurrently.  I believe something entirely different would be
needed: either a complete serialization of messages (like the OSS
and ALSA drivers), or a concept of transactions.

Also, I don't know whether or rather how much the MCI should protect
itself against concurrent access.
Of course it's nice to have, but every code section like this is IMHO broken:
 Enter CS(wma)
 ...
 Leave CS(wma) /* because the app may call back */
 Do something like sleep/wait or winmmXYZ or mciXYZ()
 Enter CS(wma) -- unsafe. anything might have happened since,
   wma might even be gone (close and FreeHeap) entirely.
 ...

Regards,
 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mciavi-Prevent-deadlock-when-closing-while-playing.patch
Type: application/octet-stream
Size: 1473 bytes
Desc: 0001-mciavi-Prevent-deadlock-when-closing-while-playing.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100311/c4c06348/attachment-0001.obj>


More information about the wine-patches mailing list