Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
15907b50
Commit
15907b50
authored
Mar 17, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Mar 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix midi deadlock by not holding lock on release.
parent
3120c086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
mci.c
dlls/winmm/mci.c
+14
-8
No files found.
dlls/winmm/mci.c
View file @
15907b50
...
@@ -1767,19 +1767,25 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
...
@@ -1767,19 +1767,25 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwParam
,
lpParms
);
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwParam
,
lpParms
);
if
(
wDevID
==
MCI_ALL_DEVICE_ID
)
{
if
(
wDevID
==
MCI_ALL_DEVICE_ID
)
{
LPWINE_MCIDRIVER
next
;
EnterCriticalSection
(
&
WINMM_cs
);
/* FIXME: shall I notify once after all is done, or for
/* FIXME: shall I notify once after all is done, or for
* each of the open drivers ? if the latest, which notif
* each of the open drivers ? if the latest, which notif
* to return when only one fails ?
* to return when only one fails ?
*/
*/
for
(
wmd
=
MciDrivers
;
wmd
;
)
{
while
(
MciDrivers
)
{
next
=
wmd
->
lpNext
;
/* Retrieve the device ID under lock, but send the message without,
MCI_Close
(
wmd
->
wDeviceID
,
dwParam
,
lpParms
);
* the driver might be calling some winmm functions from another
wmd
=
next
;
* thread before being fully stopped.
*/
EnterCriticalSection
(
&
WINMM_cs
);
if
(
!
MciDrivers
)
{
LeaveCriticalSection
(
&
WINMM_cs
);
break
;
}
wDevID
=
MciDrivers
->
wDeviceID
;
LeaveCriticalSection
(
&
WINMM_cs
);
MCI_Close
(
wDevID
,
dwParam
,
lpParms
);
}
}
LeaveCriticalSection
(
&
WINMM_cs
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment