[NTOSKRNL] Place INIT_FUNCTION before the return type (#2823)

(but after 'static' or SAL 2 annotation.)
Follow-up to 71fefa32, which mentions that it's actually required by the compiler in some circumstances.
This commit is contained in:
Serge Gautherie 2020-05-23 15:56:10 +02:00 committed by GitHub
parent 35b5876a95
commit b20f815126
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 57 additions and 57 deletions

View file

@ -1529,8 +1529,8 @@ CcGetFileObjectFromSectionPtrs (
return NULL;
}
VOID
INIT_FUNCTION
VOID
NTAPI
CcInitView (
VOID)

View file

@ -446,8 +446,8 @@ Quit:
return Status;
}
INIT_FUNCTION
static
INIT_FUNCTION
NTSTATUS
CmpCreateHardwareProfile(HANDLE ControlSetHandle)
{

View file

@ -1492,8 +1492,8 @@ DbgkClearProcessDebugObject(IN PEPROCESS Process,
return STATUS_SUCCESS;
}
VOID
INIT_FUNCTION
VOID
NTAPI
DbgkInitialize(VOID)
{

View file

@ -250,8 +250,8 @@ ExpDeleteCallback(IN PVOID Object)
* @remarks None
*
*--*/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeCallbacks(VOID)
{

View file

@ -37,8 +37,8 @@ static const INFORMATION_CLASS_INFO ExEventInfoClass[] =
/* FUNCTIONS *****************************************************************/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeEventImplementation(VOID)
{

View file

@ -31,8 +31,8 @@ GENERIC_MAPPING ExEventPairMapping =
/* FUNCTIONS *****************************************************************/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeEventPairImplementation(VOID)
{

View file

@ -42,8 +42,8 @@ GENERIC_MAPPING ExpKeyedEventMapping =
/* FUNCTIONS *****************************************************************/
_IRQL_requires_max_(APC_LEVEL)
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeKeyedEventImplementation(VOID)
{

View file

@ -50,8 +50,8 @@ ExpDeleteMutant(PVOID ObjectBody)
FALSE);
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeMutantImplementation(VOID)
{

View file

@ -62,8 +62,8 @@ ExpDeleteProfile(PVOID ObjectBody)
if (Profile->Process) ObDereferenceObject(Profile->Process);
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeProfileImplementation(VOID)
{

View file

@ -37,8 +37,8 @@ static const INFORMATION_CLASS_INFO ExSemaphoreInfoClass[] =
/* FUNCTIONS *****************************************************************/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeSemaphoreImplementation(VOID)
{

View file

@ -217,8 +217,8 @@ ExpTimerApcKernelRoutine(IN PKAPC Apc,
ObDereferenceObjectEx(Timer, DerefsToDo);
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeTimerImplementation(VOID)
{

View file

@ -52,8 +52,8 @@ LARGE_INTEGER ExpLuid = {{0x3e9, 0x0}};
/*
* @implemented
*/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpUuidInitialization(VOID)
{
@ -324,8 +324,8 @@ ExpUuidGetValues(PUUID_CACHED_VALUES_STRUCT CachedValues)
/*
* @implemented
*/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExLuidInitialization(VOID)
{

View file

@ -257,8 +257,8 @@ ExpDesktopClose(IN PEPROCESS Process OPTIONAL,
&Parameters);
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ExpWin32kInit(VOID)
{

View file

@ -515,8 +515,8 @@ ExpWorkerThreadBalanceManager(IN PVOID Context)
* @remarks This routine is only called once during system initialization.
*
*--*/
VOID
INIT_FUNCTION
VOID
NTAPI
ExpInitializeWorkerThreads(VOID)
{

View file

@ -29,8 +29,8 @@ static ERESOURCE IopBootLogResource;
/* FUNCTIONS ****************************************************************/
VOID
INIT_FUNCTION
VOID
IopInitBootLog(BOOLEAN StartBootLog)
{
ExInitializeResourceLite(&IopBootLogResource);
@ -38,8 +38,8 @@ IopInitBootLog(BOOLEAN StartBootLog)
}
VOID
INIT_FUNCTION
VOID
IopStartBootLog(VOID)
{
IopBootLogCreate = TRUE;

View file

@ -93,8 +93,8 @@ PLOADER_PARAMETER_BLOCK IopLoaderBlock;
/* INIT FUNCTIONS ************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
IopInitLookasideLists(VOID)
{
@ -240,8 +240,8 @@ IopInitLookasideLists(VOID)
}
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
IopCreateObjectTypes(VOID)
{
@ -329,8 +329,8 @@ IopCreateObjectTypes(VOID)
return TRUE;
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
IopCreateRootDirectories(VOID)
{
@ -394,8 +394,8 @@ IopCreateRootDirectories(VOID)
return TRUE;
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
@ -464,8 +464,8 @@ IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return TRUE;
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{

View file

@ -53,8 +53,8 @@ KDESCRIPTOR KiIdtDescriptor = {{0}, sizeof(KiIdt) - 1, KiIdt};
/* FUNCTIONS *****************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
KeInitExceptions(VOID)
{

View file

@ -268,9 +268,9 @@ KiInitializeTss(IN PKTSS64 Tss,
__ltr(KGDT64_SYS_TSS);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeKernelMachineDependent(
IN PKPRCB Prcb,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)

View file

@ -20,9 +20,9 @@ extern BOOLEAN RtlpUse16ByteSLists;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeKernel(IN PKPROCESS InitProcess,
IN PKTHREAD InitThread,
IN PVOID IdleStack,
@ -51,9 +51,9 @@ KiInitializeHandBuiltThread(
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiSystemStartupBootStack(VOID)
{
PLOADER_PARAMETER_BLOCK LoaderBlock = KeLoaderBlock; // hack
@ -134,9 +134,9 @@ KiSystemStartupBootStack(VOID)
KiIdleLoop();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeKernel(IN PKPROCESS InitProcess,
IN PKTHREAD InitThread,
IN PVOID IdleStack,

View file

@ -295,8 +295,8 @@ KeRosDumpStackFrames(IN PULONG_PTR Frame OPTIONAL,
}
}
VOID
INIT_FUNCTION
VOID
NTAPI
KiInitializeBugCheck(VOID)
{

View file

@ -17,8 +17,8 @@
/* FUNCTIONS *****************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
KeInitExceptions(VOID)
{

View file

@ -17,8 +17,8 @@
/* FUNCTIONS *****************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
KeInitExceptions(VOID)
{

View file

@ -145,8 +145,8 @@ static ISR_TABLE IsrTable[NR_TRAPS][1];
/* FUNCTIONS ****************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
KeInitInterrupts (VOID)
{

View file

@ -57,9 +57,9 @@ PVOID MmHyperSpaceEnd;
/* PRIVATE FUNCTIONS **********************************************************/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
//

View file

@ -57,9 +57,9 @@ BOOLEAN MiPfnsInitialized = FALSE;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeSessionSpaceLayout(VOID)
{
MmSessionSize = MI_SESSION_SIZE;
@ -180,9 +180,9 @@ MiMapPTEs(
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializePageTable(VOID)
{
ULONG64 PxePhysicalAddress;
@ -266,9 +266,9 @@ MiInitializePageTable(VOID)
MiMapPTEs((PVOID)MI_VAD_BITMAP, (PVOID)(MI_WORKING_SET_LIST + PAGE_SIZE - 1));
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildNonPagedPool(VOID)
{
/* Check if this is a machine with less than 256MB of RAM, and no overide */
@ -357,9 +357,9 @@ MiBuildNonPagedPool(VOID)
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildSystemPteSpace(VOID)
{
PMMPTE PointerPte;
@ -524,9 +524,9 @@ MiBuildPfnDatabaseFromPageTables(VOID)
#endif
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiAddDescriptorToDatabase(
PFN_NUMBER BasePage,
PFN_NUMBER PageCount,
@ -603,9 +603,9 @@ MiAddDescriptorToDatabase(
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY ListEntry;
@ -670,9 +670,9 @@ MiBuildPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
*MxFreeDescriptor = MxOldFreeDescriptor;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
ASSERT(MxPfnAllocation != 0);

View file

@ -312,9 +312,9 @@ MmIsDisabledPage(PEPROCESS Process, PVOID Address)
return FALSE;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeSessionSpaceLayout(VOID)
{
ASSERT(FALSE);

View file

@ -47,8 +47,8 @@ static KTIMER MiBalancerTimer;
/* FUNCTIONS ****************************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
{
@ -76,8 +76,8 @@ MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
MiMemoryConsumers[MC_USER].PagesTarget = NrAvailablePages - MiMinimumAvailablePages;
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitializeMemoryConsumer(
ULONG Consumer,
@ -443,8 +443,8 @@ BOOLEAN MmRosNotifyAvailablePage(PFN_NUMBER Page)
return TRUE;
}
VOID
INIT_FUNCTION
VOID
NTAPI
MiInitBalancerThread(VOID)
{

View file

@ -877,8 +877,8 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
MmUnmapPageTable(Pt);
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitGlobalKernelPageDirectory(VOID)
{

View file

@ -1492,8 +1492,8 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
}
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitGlobalKernelPageDirectory(VOID)
{

View file

@ -253,8 +253,8 @@ MiReadPageFile(
return(Status);
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitPagingFile(VOID)
{

View file

@ -445,8 +445,8 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
#endif
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitGlobalKernelPageDirectory(VOID)
{

View file

@ -37,8 +37,8 @@ RmapListFree(
ExFreePoolWithTag(P, TAG_RMAP);
}
VOID
INIT_FUNCTION
VOID
NTAPI
MmInitializeRmapList(VOID)
{

View file

@ -2749,8 +2749,8 @@ MmpCloseSection(IN PEPROCESS Process OPTIONAL,
DPRINT("MmpCloseSection(OB %p, HC %lu)\n", Object, ProcessHandleCount);
}
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
MmCreatePhysicalMemorySection(VOID)
{
@ -2800,8 +2800,8 @@ MmCreatePhysicalMemorySection(VOID)
return(STATUS_SUCCESS);
}
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
MmInitSectionImplementation(VOID)
{

View file

@ -129,8 +129,8 @@ done:
return Status;
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ObInit2(VOID)
{
@ -196,8 +196,8 @@ ObInit2(VOID)
return TRUE;
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
ObInitSystem(VOID)
{

View file

@ -28,8 +28,8 @@ PACL SeUnrestrictedDacl = NULL;
/* FUNCTIONS ******************************************************************/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitDACLs(VOID)
{

View file

@ -58,8 +58,8 @@ const LUID SeCreateSymbolicLinkPrivilege = CONST_LUID(SE_CREATE_SYMBOLIC_LINK_PR
/* PRIVATE FUNCTIONS **********************************************************/
VOID
INIT_FUNCTION
VOID
NTAPI
SepInitPrivileges(VOID)
{

View file

@ -28,8 +28,8 @@ PSECURITY_DESCRIPTOR SeUnrestrictedSd = NULL;
/* PRIVATE FUNCTIONS **********************************************************/
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitSDs(VOID)
{

View file

@ -94,8 +94,8 @@ FreeInitializedSids(VOID)
if (SeAnonymousLogonSid) ExFreePoolWithTag(SeAnonymousLogonSid, TAG_SID);
}
BOOLEAN
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitSecurityIDs(VOID)
{

View file

@ -830,8 +830,8 @@ SepDeleteToken(PVOID ObjectBody)
}
VOID
INIT_FUNCTION
VOID
NTAPI
SepInitializeTokenImplementation(VOID)
{