[SETUPLIB][REACTOS][USETUP] Turn setuplib into a DLL shared between TUI and GUI 1st-stage setups (#7523)

CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two InitializeSetup() phases have been collapsed to make the initialization simpler.

Average reductions (percentages; see PR #7523 for actual numbers):

x86 Debug builds:
reactos.exe: 35.1%
smss.exe   : 39.8%
Total (including setuplib.dll): 17.9%

x86 Release builds:
reactos.exe: 22.3%
smss.exe   : 25.0%
Total (including setuplib.dll): 10.6%

x64 Debug builds:
reactos.exe: 40.6%
smss.exe   : 41.6%
Total (including setuplib.dll): 20.0%

x64 Release builds:
reactos.exe: 22.8%
smss.exe   : 22.3%
Total (including setuplib.dll): 10.1%
This commit is contained in:
Hermès Bélusca-Maïto 2024-11-22 21:45:06 +01:00
parent e51e5de1f8
commit d7c1d220b5
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
35 changed files with 462 additions and 262 deletions

View file

@ -17,6 +17,7 @@
/* FUNCTIONS ****************************************************************/
PGENERIC_LIST
NTAPI
CreateGenericList(VOID)
{
PGENERIC_LIST List;
@ -33,6 +34,7 @@ CreateGenericList(VOID)
}
VOID
NTAPI
DestroyGenericList(
IN OUT PGENERIC_LIST List,
IN BOOLEAN FreeData)
@ -59,6 +61,7 @@ DestroyGenericList(
}
BOOLEAN
NTAPI
AppendGenericListEntry(
IN OUT PGENERIC_LIST List,
IN PVOID Data,
@ -84,6 +87,7 @@ AppendGenericListEntry(
}
VOID
NTAPI
SetCurrentListEntry(
IN PGENERIC_LIST List,
IN PGENERIC_LIST_ENTRY Entry)
@ -94,6 +98,7 @@ SetCurrentListEntry(
}
PGENERIC_LIST_ENTRY
NTAPI
GetCurrentListEntry(
IN PGENERIC_LIST List)
{
@ -101,6 +106,7 @@ GetCurrentListEntry(
}
PGENERIC_LIST_ENTRY
NTAPI
GetFirstListEntry(
IN PGENERIC_LIST List)
{
@ -111,6 +117,7 @@ GetFirstListEntry(
}
PGENERIC_LIST_ENTRY
NTAPI
GetNextListEntry(
IN PGENERIC_LIST_ENTRY Entry)
{
@ -123,6 +130,7 @@ GetNextListEntry(
}
PVOID
NTAPI
GetListEntryData(
IN PGENERIC_LIST_ENTRY Entry)
{
@ -137,6 +145,7 @@ GetListEntryUiData(
}
ULONG
NTAPI
GetNumberOfListEntries(
IN PGENERIC_LIST List)
{