Avoid a possible deadlock when stopping playback

Christian Costa titan.costa at wanadoo.fr
Tue Mar 16 10:29:40 CST 2004


Hi Dmitry,
Are you sure this is usefull.
How can SetEvent cause a deadlock?
Bye,
Christian

> Message du 16/03/04 14:54
> De : Dmitry Timoshkov 
> A : wine-patches at winehq.com
> Copie à : 
> Objet : Avoid a possible deadlock when stopping playback
> Hello,
> 
> looks like it's a good idea to do the same when signalling hStopEvent.
> 
> Changelog:
> Dmitry Timoshkov 
> Avoid a possible deadlock when stopping playback.
> 
> --- cvs/hq/wine/dlls/winmm/mciavi/mciavi.c 2004-03-16 18:37:03.000000000 +0800
> +++ wine/dlls/winmm/mciavi/mciavi.c 2004-03-16 19:38:42.000000000 +0800
> @@ -606,7 +606,9 @@ static DWORD MCIAVI_mciStop(UINT wDevID,
> switch (wma->dwStatus) {
> case MCI_MODE_PLAY:
> case MCI_MODE_RECORD:
> + LeaveCriticalSection(&wma->cs);
> SetEvent(wma->hStopEvent);
> + EnterCriticalSection(&wma->cs);
> /* fall through */
> case MCI_MODE_PAUSE:
> /* Since our wave notification callback takes the lock,
> 
> 
> 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20040316/22c2f733/attachment.htm


More information about the wine-devel mailing list