DirectSound: Latent deadlock fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was tracking down a deadlock problem when I found the following code
in DSOUND_callback:

     EnterCriticalSection(&(This->mixlock));
     ...
     LeaveCriticalSection(&(This->lock));

Of course it's #ifdefed-out so it doesn't matter but we might as well
fix it before someone tries to use it.


Changelog:

   Francois Gouget <fgouget@codeweavers.com>

  * dlls/dsound/mixer.c

    Fix latent deadlock in DSOUND_callback


--
Francois Gouget
fgouget@codeweavers.com

Index: dlls/dsound/mixer.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/mixer.c,v
retrieving revision 1.4
diff -u -r1.4 mixer.c
--- dlls/dsound/mixer.c	18 Oct 2002 23:48:59 -0000	1.4
+++ dlls/dsound/mixer.c	9 Jan 2003 20:25:40 -0000
@@ -1030,7 +1033,7 @@
 		/* queue new buffer if we have data for it */
 		if (inq>1) DSOUND_WaveQueue(This, inq-1);
 #ifdef SYNC_CALLBACK
-		LeaveCriticalSection(&(This->lock));
+		LeaveCriticalSection(&(This->mixlock));
 #endif
 	}
 	TRACE("completed\n");


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux