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 -
This commit is contained in:
svenbarth 2016-01-29 15:36:58 +00:00
parent 3da7675eb1
commit 7e1e947b71
4 changed files with 15 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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