dsound: Make sure we're holding the lock on Drop And Stop

Maarten Lankhorst m.b.lankhorst at gmail.com
Fri Apr 20 14:50:37 CDT 2007


This fixes an interesting deadlock with the alsa driver:

DSOUND_Stop is called, message is added to thread queue.
DSOUND_Release is called, message is added to thread queue.

Both are fast messages, so second is added before first.

thread reads: We're going down! And terminates.

DSOUND_Stop's message is never read and it waits till eternity, so
starting/stopping never occurs any more.

Triggered this bug with my dsoundtest program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lock.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070420/9e55490b/lock-0001.bin


More information about the wine-patches mailing list