=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: mmdevapi: Avoid lock contention after SetEvent.
Alexandre Julliard
julliard at winehq.org
Thu Dec 20 12:39:56 CST 2012
Module: wine
Branch: master
Commit: a39e423f6f6d2d61eb4bdc052d2ea2ab219325e8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a39e423f6f6d2d61eb4bdc052d2ea2ab219325e8
Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date: Sun Dec 9 22:56:40 2012 +0100
mmdevapi: Avoid lock contention after SetEvent.
---
dlls/winealsa.drv/mmdevdrv.c | 6 +++---
dlls/wineoss.drv/mmdevdrv.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 3e8ad8d..8c905e9 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -2137,12 +2137,12 @@ static void CALLBACK alsa_push_buffer_data(void *user, BOOLEAN timer)
alsa_write_data(This);
else if(This->dataflow == eCapture)
alsa_read_data(This);
-
- if(This->event)
- SetEvent(This->event);
}
LeaveCriticalSection(&This->lock);
+
+ if(This->event)
+ SetEvent(This->event);
}
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 4de5ae6..ea6d452 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -1481,12 +1481,12 @@ static void CALLBACK oss_period_callback(void *user, BOOLEAN timer)
oss_write_data(This);
else if(This->dataflow == eCapture)
oss_read_data(This);
-
- if(This->event)
- SetEvent(This->event);
}
LeaveCriticalSection(&This->lock);
+
+ if(This->event)
+ SetEvent(This->event);
}
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
More information about the wine-cvs
mailing list