[PATCH 1/2] krnl386.exe16: Avoid the DOSVM_HardwareInterruptPM() forward declaration.
Francois Gouget
fgouget at free.fr
Thu Feb 22 08:13:47 CST 2018
Signed-off-by: Francois Gouget <fgouget at free.fr>
---
dlls/krnl386.exe16/dosexe.h | 1 -
dlls/krnl386.exe16/interrupts.c | 86 ++++++++++++++++++++---------------------
2 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/dlls/krnl386.exe16/dosexe.h b/dlls/krnl386.exe16/dosexe.h
index 8f9dc3458e6..4a59cdf6c05 100644
--- a/dlls/krnl386.exe16/dosexe.h
+++ b/dlls/krnl386.exe16/dosexe.h
@@ -275,7 +275,6 @@ extern void __wine_call_int_handler( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern void DOSVM_CallBuiltinHandler( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern BOOL DOSVM_EmulateInterruptPM( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern FARPROC16 DOSVM_GetPMHandler16( BYTE ) DECLSPEC_HIDDEN;
-extern void DOSVM_HardwareInterruptPM( CONTEXT *, BYTE ) DECLSPEC_HIDDEN;
extern void DOSVM_SetPMHandler16( BYTE, FARPROC16 ) DECLSPEC_HIDDEN;
/* ioports.c */
diff --git a/dlls/krnl386.exe16/interrupts.c b/dlls/krnl386.exe16/interrupts.c
index 298f7e467a6..70690f600e6 100644
--- a/dlls/krnl386.exe16/interrupts.c
+++ b/dlls/krnl386.exe16/interrupts.c
@@ -177,6 +177,49 @@ static void DOSVM_PushFlags( CONTEXT *context, BOOL islong, BOOL isstub )
}
+/**********************************************************************
+ * DOSVM_HardwareInterruptPM
+ *
+ * Emulate call to interrupt handler in 16-bit or 32-bit protected mode.
+ *
+ * Pushes interrupt frame to stack and changes instruction
+ * pointer to interrupt handler.
+ */
+void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum )
+{
+ FARPROC16 addr = DOSVM_GetPMHandler16( intnum );
+
+ if (SELECTOROF(addr) == DOSVM_dpmi_segments->int16_sel)
+ {
+ TRACE( "builtin interrupt %02x has been invoked "
+ "(through vector %02x)\n",
+ OFFSETOF(addr)/DOSVM_STUB_PM16, intnum );
+
+ if (intnum == 0x25 || intnum == 0x26)
+ DOSVM_PushFlags( context, FALSE, FALSE );
+
+ DOSVM_BuildCallFrame( context,
+ DOSVM_IntProcRelay,
+ DOSVM_GetBuiltinHandler(
+ OFFSETOF(addr)/DOSVM_STUB_PM16 ) );
+ }
+ else
+ {
+ TRACE( "invoking hooked interrupt %02x at %04x:%04x\n",
+ intnum, SELECTOROF(addr), OFFSETOF(addr) );
+
+ /* Push the flags and return address on the stack */
+ PUSH_WORD16( context, LOWORD(context->EFlags) );
+ PUSH_WORD16( context, context->SegCs );
+ PUSH_WORD16( context, LOWORD(context->Eip) );
+
+ /* Jump to the interrupt handler */
+ context->SegCs = HIWORD(addr);
+ context->Eip = LOWORD(addr);
+ }
+}
+
+
/**********************************************************************
* DOSVM_EmulateInterruptPM
*
@@ -243,49 +286,6 @@ BOOL DOSVM_EmulateInterruptPM( CONTEXT *context, BYTE intnum )
}
-/**********************************************************************
- * DOSVM_HardwareInterruptPM
- *
- * Emulate call to interrupt handler in 16-bit or 32-bit protected mode.
- *
- * Pushes interrupt frame to stack and changes instruction
- * pointer to interrupt handler.
- */
-void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum )
-{
- FARPROC16 addr = DOSVM_GetPMHandler16( intnum );
-
- if (SELECTOROF(addr) == DOSVM_dpmi_segments->int16_sel)
- {
- TRACE( "builtin interrupt %02x has been invoked "
- "(through vector %02x)\n",
- OFFSETOF(addr)/DOSVM_STUB_PM16, intnum );
-
- if (intnum == 0x25 || intnum == 0x26)
- DOSVM_PushFlags( context, FALSE, FALSE );
-
- DOSVM_BuildCallFrame( context,
- DOSVM_IntProcRelay,
- DOSVM_GetBuiltinHandler(
- OFFSETOF(addr)/DOSVM_STUB_PM16 ) );
- }
- else
- {
- TRACE( "invoking hooked interrupt %02x at %04x:%04x\n",
- intnum, SELECTOROF(addr), OFFSETOF(addr) );
-
- /* Push the flags and return address on the stack */
- PUSH_WORD16( context, LOWORD(context->EFlags) );
- PUSH_WORD16( context, context->SegCs );
- PUSH_WORD16( context, LOWORD(context->Eip) );
-
- /* Jump to the interrupt handler */
- context->SegCs = HIWORD(addr);
- context->Eip = LOWORD(addr);
- }
-}
-
-
/**********************************************************************
* DOSVM_GetPMHandler16
*
--
2.16.1
More information about the wine-devel
mailing list