[NTOSKRNL] Sync some INIT_FUNCTION (#2824)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Sat, 23 May 2020 14:05:58 +0000 (16:05 +0200)
committerGitHub <noreply@github.com>
Sat, 23 May 2020 14:05:58 +0000 (16:05 +0200)
- Sync some INIT_FUNCTION with how they are used and what is already
  specified in the headers.
Addendum to commit 85e5b5be (r49445).

- KdbpGetCommandLineSettings(): Remove INIT_FUNCTION.
Fix MSVC 2015 x86 custom build:
"...\ntoskrnl\kdbg\kdb.c(1699): error C2983: 'KdbpGetCommandLineSettings': all declarations must have an identical __declspec(code_seg(...))"

And may also fix obscure bugs when entering into the KDBG debugger.

ntoskrnl/cache/fssup.c
ntoskrnl/config/cmse.c
ntoskrnl/ex/init.c
ntoskrnl/kdbg/kdb.c
ntoskrnl/ob/obinit.c

index 1bfe40e..f608361 100644 (file)
@@ -77,6 +77,7 @@ LIST_ENTRY CcpAllSharedCacheMaps;
 
 /* FUNCTIONS ******************************************************************/
 
+INIT_FUNCTION
 BOOLEAN
 NTAPI
 CcInitializeCacheManager(VOID)
@@ -107,6 +108,7 @@ CcInitializeCacheManager(VOID)
     return TRUE;
 }
 
+INIT_FUNCTION
 VOID
 NTAPI
 CcPfInitializePrefetcher(VOID)
index 780c887..1d5aec4 100644 (file)
@@ -16,7 +16,6 @@
 
 /* FUNCTIONS *****************************************************************/
 
-//INIT_FUNCTION
 PSECURITY_DESCRIPTOR
 NTAPI
 CmpHiveRootSecurityDescriptor(VOID)
index c09918e..e39b000 100644 (file)
@@ -19,6 +19,7 @@
     RTL_SIZEOF_THROUGH_FIELD(LOADER_PARAMETER_EXTENSION, AcpiTableSize)
 
 /* Temporary hack */
+INIT_FUNCTION
 BOOLEAN
 NTAPI
 MmArmInitSystem(
index 7866244..2698190 100644 (file)
@@ -1691,7 +1691,6 @@ continue_execution:
     return ContinueType;
 }
 
-INIT_FUNCTION
 VOID
 NTAPI
 KdbpGetCommandLineSettings(
index 209feda..e424401 100644 (file)
@@ -46,6 +46,7 @@ GENERIC_MAPPING ObpSymbolicLinkMapping =
 PDEVICE_MAP ObSystemDeviceMap = NULL;
 ULONG ObpTraceLevel = 0;
 
+INIT_FUNCTION
 VOID
 NTAPI
 PsInitializeQuotaSystem(VOID);