Francois Gouget : krnl386.exe16: Avoid the DOSVM_HardwareInterruptPM() forward declaration.

Alexandre Julliard julliard at winehq.org
Thu Feb 22 15:07:47 CST 2018


Module: wine
Branch: master
Commit: a52b257d56e5beed62bffe93dfd5be9d2b3c1670
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a52b257d56e5beed62bffe93dfd5be9d2b3c1670

Author: Francois Gouget <fgouget at free.fr>
Date:   Thu Feb 22 15:13:47 2018 +0100

krnl386.exe16: Avoid the DOSVM_HardwareInterruptPM() forward declaration.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 8f9dc34..4a59cdf 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 298f7e4..70690f6 100644
--- a/dlls/krnl386.exe16/interrupts.c
+++ b/dlls/krnl386.exe16/interrupts.c
@@ -178,6 +178,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
  *
  * Emulate software interrupt in 16-bit or 32-bit protected mode.
@@ -244,49 +287,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
  *
  * Return the protected mode interrupt vector for a given interrupt.




More information about the wine-cvs mailing list