dlls/winmm/winecoreaudio/audio.c: fix race condition in drvclose
Nick Burns
adger44 at hotmail.com
Mon Jan 1 04:22:58 CST 2007
This patch fixes a race condition that happens in winecfg (the only place I
ever see this crash) caused by the messageThread being alive after the
driver has been closed.
So -- on drvclose/coreaudio_waverelease -- I wait for the messageThread to
finish -- verify it has finished -- and clean it up.
I would prefer to wait for the messageThread to start in coreaudio_waveinit
as well.
But cannot because the messageThread will not start executing (due to loader
locks) this leads to deadlock (if you try to wait for a signal that the
messageThread has started).
There could be problems with startup and playing sounds (really fast) -- but
im not sure about that yet...
- Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winePatchFixCoreAudio.diff
Type: application/octet-stream
Size: 2836 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070101/1aa96124/winePatchFixCoreAudio-0001.obj
More information about the wine-patches
mailing list