Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ed37b7a8
Commit
ed37b7a8
authored
Dec 08, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move (again) usage of 16 bit specific functions (thunk lock) to 16 bit
code only.
parent
88b928fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
mmsystem.c
dlls/winmm/mmsystem.c
+14
-18
time.c
dlls/winmm/time.c
+3
-3
winemm.h
dlls/winmm/winemm.h
+2
-1
winmm.c
dlls/winmm/winmm.c
+7
-4
No files found.
dlls/winmm/mmsystem.c
View file @
ed37b7a8
...
...
@@ -53,13 +53,6 @@ static LRESULT DRIVER_CloseDriver16(HDRVR16, LPARAM, LPARAM);
static
LRESULT
DRIVER_SendMessage16
(
HDRVR16
,
UINT
,
LPARAM
,
LPARAM
);
static
LRESULT
MMIO_Callback16
(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
static
void
MMSYSTEM_Yield
(
void
)
{
DWORD
count
;
ReleaseThunkLock
(
&
count
);
RestoreThunkLock
(
count
);
}
/* ###################################################
* # LIBRARY #
* ###################################################
...
...
@@ -88,21 +81,24 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
}
WINMM_IData
->
hWinMM16Instance
=
hinstDLL
;
/* hook in our 16 bit function pointers */
pFnGetMMThread16
=
WINMM_GetmmThread
;
pFnOpenDriver16
=
DRIVER_OpenDriver16
;
pFnCloseDriver16
=
DRIVER_CloseDriver16
;
pFnSendMessage16
=
DRIVER_SendMessage16
;
pFnMmioCallback16
=
MMIO_Callback16
;
pFnYield16
=
MMSYSTEM_Yield
;
pFnGetMMThread16
=
WINMM_GetmmThread
;
pFnOpenDriver16
=
DRIVER_OpenDriver16
;
pFnCloseDriver16
=
DRIVER_CloseDriver16
;
pFnSendMessage16
=
DRIVER_SendMessage16
;
pFnMmioCallback16
=
MMIO_Callback16
;
pFnReleaseThunkLock
=
ReleaseThunkLock
;
pFnRestoreThunkLock
=
RestoreThunkLock
;
MMDRV_Init16
();
break
;
case
DLL_PROCESS_DETACH
:
WINMM_IData
->
hWinMM16Instance
=
0
;
pFnGetMMThread16
=
NULL
;
pFnOpenDriver16
=
NULL
;
pFnCloseDriver16
=
NULL
;
pFnSendMessage16
=
NULL
;
pFnMmioCallback16
=
NULL
;
pFnGetMMThread16
=
NULL
;
pFnOpenDriver16
=
NULL
;
pFnCloseDriver16
=
NULL
;
pFnSendMessage16
=
NULL
;
pFnMmioCallback16
=
NULL
;
pFnReleaseThunkLock
=
NULL
;
pFnRestoreThunkLock
=
NULL
;
/* FIXME: add equivalent for MMDRV_Init16() */
break
;
case
DLL_THREAD_ATTACH
:
...
...
dlls/winmm/time.c
View file @
ed37b7a8
...
...
@@ -348,18 +348,18 @@ MMRESULT WINAPI timeEndPeriod(UINT wPeriod)
return
0
;
}
void
(
*
pFnYield16
)(
void
)
/* = NULL */
;
/**************************************************************************
* timeGetTime [MMSYSTEM.607]
* timeGetTime [WINMM.@]
*/
DWORD
WINAPI
timeGetTime
(
void
)
{
DWORD
count
;
/* FIXME: releasing the win16 lock here is a temporary hack (I hope)
* that lets mciavi.drv run correctly
*/
if
(
pFn
Yield16
)
pFnYield16
(
);
if
(
pFn
ReleaseThunkLock
)
pFnReleaseThunkLock
(
&
count
);
TIME_MMTimeStart
();
if
(
pFnRestoreThunkLock
)
pFnRestoreThunkLock
(
count
);
return
WINMM_IData
->
mmSysTimeMS
;
}
dlls/winmm/winemm.h
View file @
ed37b7a8
...
...
@@ -305,7 +305,8 @@ extern WINMM_MapType (*pFnMciUnMapMsg32ATo16)(WORD,WORD,DWORD,DWORD);
extern
LRESULT
(
*
pFnCallMMDrvFunc16
)(
DWORD
/* in fact FARPROC16 */
,
WORD
,
WORD
,
LONG
,
LONG
,
LONG
);
extern
unsigned
(
*
pFnLoadMMDrvFunc16
)(
LPCSTR
,
LPWINE_DRIVER
,
LPWINE_MM_DRIVER
);
extern
LRESULT
(
*
pFnMmioCallback16
)(
DWORD
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
extern
void
(
*
pFnYield16
)(
void
);
extern
void
(
WINAPI
*
pFnReleaseThunkLock
)(
DWORD
*
);
extern
void
(
WINAPI
*
pFnRestoreThunkLock
)(
DWORD
);
/* GetDriverFlags() returned bits is not documented (nor the call itself)
* Here are Wine only definitions of the bits
*/
...
...
dlls/winmm/winmm.c
View file @
ed37b7a8
...
...
@@ -62,6 +62,9 @@ static void MyUserYield(void)
}
}
void
(
WINAPI
*
pFnReleaseThunkLock
)(
DWORD
*
);
void
(
WINAPI
*
pFnRestoreThunkLock
)(
DWORD
);
/* ========================================================================
* G L O B A L S E T T I N G S
* ========================================================================*/
...
...
@@ -1895,9 +1898,9 @@ static BOOL MMSYSTEM_MidiStream_PostMessage(WINE_MIDIStream* lpMidiStrm, WORD ms
if
(
PostThreadMessageA
(
lpMidiStrm
->
dwThreadID
,
msg
,
pmt1
,
pmt2
))
{
DWORD
count
;
ReleaseThunkLock
(
&
count
);
if
(
pFnReleaseThunkLock
)
pFn
ReleaseThunkLock
(
&
count
);
WaitForSingleObject
(
lpMidiStrm
->
hEvent
,
INFINITE
);
RestoreThunkLock
(
count
);
if
(
pFnRestoreThunkLock
)
pFn
RestoreThunkLock
(
count
);
}
else
{
WARN
(
"bad PostThreadMessageA
\n
"
);
return
FALSE
;
...
...
@@ -1982,9 +1985,9 @@ MMRESULT MIDI_StreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID, DWORD cMidi
* (meaning the Win16Lock is set), so that it's released and the 32 bit thread running
* MMSYSTEM_MidiStreamPlayer can acquire Win16Lock to create its queue.
*/
ReleaseThunkLock
(
&
count
);
if
(
pFnReleaseThunkLock
)
pFn
ReleaseThunkLock
(
&
count
);
WaitForSingleObject
(
lpMidiStrm
->
hEvent
,
INFINITE
);
RestoreThunkLock
(
count
);
if
(
pFnRestoreThunkLock
)
pFn
RestoreThunkLock
(
count
);
}
TRACE
(
"=> (%u/%d) hMidi=%p ret=%d lpMidiStrm=%p
\n
"
,
...
...
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