Browse Source

asm_exit is only needed on Win32 (Note: the removal of asm_exit from TEntryInformation in the previous commit should have been in this one -.- )

rtl/win32/sysosh.inc:
  + add TEntryInformationOS for Win32 which contains asm_exit
rtl/win32/system.pp:
  * EntryInformation: adjust initialization
  * system_exit: call the correct function variable
rtl/win32/sysinit.inc:
  * SysInitEntryInformation: adjust initialization
  * SetupEntryInformation: adjust commented setup of the function variable
rtl/java/jsystemh_types.inc:
  * adjust TEntryInformation for consistency reasons

git-svn-id: trunk@33025 -
svenbarth 9 years ago
parent
commit
7e1e947b71
4 changed files with 15 additions and 5 deletions
  1. 0 1
      rtl/java/jsystemh_types.inc
  2. 7 0
      rtl/win/sysosh.inc
  3. 4 2
      rtl/win32/sysinit.inc
  4. 4 2
      rtl/win32/system.pp

+ 0 - 1
rtl/java/jsystemh_types.inc

@@ -540,7 +540,6 @@ type
   TEntryInformation = record
   TEntryInformation = record
     InitFinalTable : Pointer;
     InitFinalTable : Pointer;
     ThreadvarTablesTable : Pointer;
     ThreadvarTablesTable : Pointer;
-    asm_exit : Procedure;stdcall;
     PascalMain : Procedure;
     PascalMain : Procedure;
     valgrind_used : boolean;
     valgrind_used : boolean;
     {$ifdef HAS_ENTRYINFORMATION_OS}
     {$ifdef HAS_ENTRYINFORMATION_OS}

+ 7 - 0
rtl/win/sysosh.inc

@@ -49,6 +49,13 @@ type
   end;
   end;
 {$endif WINCE}
 {$endif WINCE}
 
 
+{$ifdef Win32}
+  {$define HAS_ENTRYINFORMATION_OS}
+  TEntryInformationOS = record
+    asm_exit : Procedure;stdcall;
+  end;
+{$endif Win32}
+
 const
 const
 {$ifdef WINCE}
 {$ifdef WINCE}
   KernelDLL = 'coredll';
   KernelDLL = 'coredll';

+ 4 - 2
rtl/win32/sysinit.inc

@@ -48,9 +48,11 @@
       SysInitEntryInformation : TEntryInformation = (
       SysInitEntryInformation : TEntryInformation = (
         InitFinalTable : @InitFinalTable;
         InitFinalTable : @InitFinalTable;
         ThreadvarTablesTable : @ThreadvarTablesTable;
         ThreadvarTablesTable : @ThreadvarTablesTable;
-        asm_exit : @asm_exit;
         PascalMain : @PascalMain;
         PascalMain : @PascalMain;
         valgrind_used : false;
         valgrind_used : false;
+        OS : (
+          asm_exit : @asm_exit;
+          );
         );
         );
 
 
 
 
@@ -59,7 +61,7 @@
         { valgind_used is the only thng that can change at startup
         { valgind_used is the only thng that can change at startup
         EntryInformation.InitFinalTable:=@InitFinalTable;
         EntryInformation.InitFinalTable:=@InitFinalTable;
         EntryInformation.ThreadvarTablesTable:=@ThreadvarTablesTable;
         EntryInformation.ThreadvarTablesTable:=@ThreadvarTablesTable;
-        EntryInformation.asm_exit:=@asm_exit;
+        EntryInformation.OS.asm_exit:=@asm_exit;
         EntryInformation.PascalMain:=@PascalMain;}
         EntryInformation.PascalMain:=@PascalMain;}
         SysInitEntryInformation.valgrind_used:=valgrind_used;
         SysInitEntryInformation.valgrind_used:=valgrind_used;
       end;
       end;

+ 4 - 2
rtl/win32/system.pp

@@ -120,9 +120,11 @@ const
   EntryInformation : TEntryInformation = (
   EntryInformation : TEntryInformation = (
     InitFinalTable : @InitFinalTable;
     InitFinalTable : @InitFinalTable;
     ThreadvarTablesTable : @ThreadvarTablesTable;
     ThreadvarTablesTable : @ThreadvarTablesTable;
-    asm_exit : @asm_exit;
     PascalMain : @PascalMain;
     PascalMain : @PascalMain;
     valgrind_used : false;
     valgrind_used : false;
+    OS : (
+      asm_exit: @asm_exit;
+      );
     );
     );
 
 
 {$ifdef FPC_USE_WIN32_SEH}
 {$ifdef FPC_USE_WIN32_SEH}
@@ -183,7 +185,7 @@ begin
 {$endif FPC_USE_WIN32_SEH}
 {$endif FPC_USE_WIN32_SEH}
 
 
   { do cleanup required by the startup code }
   { do cleanup required by the startup code }
-  EntryInformation.asm_exit();
+  EntryInformation.OS.asm_exit();
 
 
   { call exitprocess, with cleanup as required }
   { call exitprocess, with cleanup as required }
   ExitProcess(exitcode);
   ExitProcess(exitcode);