[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)

* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
This commit is contained in:
Timo Kreuzer 2018-12-30 12:19:11 +01:00 committed by GitHub
parent 7c66247343
commit 71fefa32db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 522 additions and 296 deletions

View file

@ -233,8 +233,8 @@ if(MSVC)
add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER")
add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER")
else()
add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text")
add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text")
add_target_link_flags(freeldr_pe "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:INIT=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text")
add_target_link_flags(freeldr_pe_dbg "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:INIT=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text")
endif()
else()
add_target_link_flags(freeldr_pe "-Wl,--strip-all,--exclude-all-symbols,--file-alignment,0x1000,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lds")

View file

@ -4,6 +4,8 @@ SECTIONS
{
*(.text)
*(SORT(.text*))
*(INIT)
*(SORT(INIT*))
*(.data)
*(SORT(.data*))
*(.rdata)

View file

@ -753,7 +753,7 @@ VfatReleaseFromLazyWrite(
ExReleaseResourceLite(&(Fcb->MainResource));
}
INIT_SECTION
INIT_FUNCTION
VOID
VfatInitFastIoRoutines(
PFAST_IO_DISPATCH FastIoDispatch)

View file

@ -48,7 +48,7 @@ PVFAT_GLOBAL_DATA VfatGlobalData;
* RegistryPath = path to our configuration entries
* RETURNS: Success or failure
*/
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(

View file

@ -5,17 +5,12 @@
#include <ntdddisk.h>
#include <dos.h>
#include <pseh/pseh2.h>
#include <section_attribs.h>
#ifdef KDBG
#include <ndk/kdfuncs.h>
#include <reactos/kdros.h>
#endif
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#define USE_ROS_CC_AND_FS
#define ENABLE_SWAPOUT
@ -823,6 +818,7 @@ VfatSetExtendedAttributes(
/* fastio.c */
INIT_FUNCTION
VOID
VfatInitFastIoRoutines(
PFAST_IO_DISPATCH FastIoDispatch);
@ -1127,6 +1123,7 @@ VfatFileSystemControl(
/* iface.c */
INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(

View file

@ -82,7 +82,7 @@ DfsUnload(PDRIVER_OBJECT DriverObject)
UNIMPLEMENTED;
}
INIT_SECTION
INIT_FUNCTION
NTSTATUS
DfsDriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath)

View file

@ -1,6 +1,15 @@
#ifndef _DFS_PCH_
#define _DFS_PCH_
#ifndef INIT_SECTION
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#define INIT_FUNCTION INIT_SECTION
#endif
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
#define DFS_CSCAGENT_NAME_CONTEXT 0xAAAAAAAA
@ -49,6 +58,7 @@ DfsUnload(
PDRIVER_OBJECT DriverObject
);
INIT_FUNCTION
NTSTATUS
DfsDriverEntry(
PDRIVER_OBJECT DriverObject,

View file

@ -32,6 +32,7 @@
#define NDEBUG
#include <debug.h>
INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(
@ -39,11 +40,13 @@ DriverEntry(
PUNICODE_STRING RegistryPath
);
INIT_FUNCTION
VOID
MupInitializeData(
VOID
);
INIT_FUNCTION
VOID
MupInitializeVcb(
PMUP_VCB Vcb
@ -76,7 +79,7 @@ NTSTATUS MupOrderedErrorList[] = { STATUS_UNSUCCESSFUL,
/* FUNCTIONS ****************************************************************/
INIT_SECTION
INIT_FUNCTION
VOID
MupInitializeData(VOID)
{
@ -102,7 +105,7 @@ MupUninitializeData()
ExDeleteResourceLite(&MupVcbLock);
}
INIT_SECTION
INIT_FUNCTION
VOID
MupInitializeVcb(PMUP_VCB Vcb)
{
@ -2507,7 +2510,7 @@ MupUnload(PDRIVER_OBJECT DriverObject)
* RegistryPath = path to our configuration entries
* RETURNS: Success or failure
*/
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(PDRIVER_OBJECT DriverObject,

View file

@ -5,12 +5,7 @@
#include <ntifs.h>
#include <pseh/pseh2.h>
#include <ndk/muptypes.h>
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#include <section_attribs.h>
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
#define IO_METHOD_FROM_CTL_CODE(C) (C & 0x00000003)

View file

@ -49,7 +49,7 @@ PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
* RegistryPath = path to our configuration entries
* RETURNS: Success or failure
*/
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(PDRIVER_OBJECT DriverObject,
@ -169,7 +169,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
* DriverObject = object describing this driver
* RETURNS: Nothing
*/
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)

View file

@ -3,12 +3,7 @@
#include <ntifs.h>
#include <pseh/pseh2.h>
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#include <section_attribs.h>
#define CACHEPAGESIZE(pDeviceExt) \
((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \
@ -1260,8 +1255,10 @@ NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
/* ntfs.c */
INIT_FUNCTION
DRIVER_INITIALIZE DriverEntry;
INIT_FUNCTION
VOID
NTAPI
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject);

View file

@ -16,6 +16,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
INIT_FUNCTION
VOID
NTAPI
HalpRegisterKdSupportFunctions(VOID)

View file

@ -786,6 +786,7 @@ HaliAcpiTimerInit(IN ULONG TimerPort,
//HalaAcpiTimerInit(TimerPort, TimerValExt);
}
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
@ -906,6 +907,7 @@ HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return STATUS_SUCCESS;
}
INIT_FUNCTION
VOID
NTAPI
HalpInitializePciBus(VOID)
@ -927,6 +929,7 @@ HalpInitNonBusHandler(VOID)
HalFindBusAddressTranslation = HalpFindBusAddressTranslation;
}
INIT_FUNCTION
VOID
NTAPI
HalpInitBusHandlers(VOID)
@ -935,6 +938,7 @@ HalpInitBusHandlers(VOID)
HalpInitNonBusHandler();
}
INIT_FUNCTION
VOID
NTAPI
HalpBuildAddressMap(VOID)
@ -942,6 +946,7 @@ HalpBuildAddressMap(VOID)
/* ACPI is magic baby */
}
INIT_FUNCTION
BOOLEAN
NTAPI
HalpGetDebugPortTable(VOID)
@ -950,6 +955,7 @@ HalpGetDebugPortTable(VOID)
(HalpDebugPortTable->BaseAddress.AddressSpaceID == 1));
}
INIT_FUNCTION
ULONG
NTAPI
HalpIs16BitPortDecodeSupported(VOID)
@ -1059,6 +1065,7 @@ HalpQueryAcpiResourceRequirements(OUT PIO_RESOURCE_REQUIREMENTS_LIST *Requiremen
/*
* @implemented
*/
INIT_FUNCTION
VOID
NTAPI
HalReportResourceUsage(VOID)

View file

@ -64,7 +64,7 @@ RtcSetClockRate(UCHAR ClockRate)
HalpReleaseCmosSpinLock();
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitializeClock(VOID)

View file

@ -154,7 +154,7 @@ HalpSetCmosData(IN ULONG BusNumber,
return Length - Len;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitializeCmos(VOID)

View file

@ -133,7 +133,7 @@ static DMA_OPERATIONS HalpDmaOperations = {
/* FUNCTIONS *****************************************************************/
#ifndef _MINIHAL_
INIT_SECTION
INIT_FUNCTION
VOID
HalpInitDma(VOID)
{

View file

@ -12,6 +12,7 @@
#define NDEBUG
#include <debug.h>
INIT_FUNCTION
VOID
NTAPI
HalpGetParameters(
@ -29,7 +30,7 @@ BOOLEAN HalpPciLockSettings;
/* PRIVATE FUNCTIONS *********************************************************/
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
@ -76,7 +77,7 @@ HalInitializeProcessor(
/*
* @implemented
*/
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalInitSystem(IN ULONG BootPhase,

View file

@ -27,7 +27,7 @@ CHAR HalpSerialNumber[31];
/* PRIVATE FUNCTIONS **********************************************************/
#ifndef _MINIHAL_
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpReportSerialNumber(VOID)
@ -58,7 +58,7 @@ HalpReportSerialNumber(VOID)
}
}
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpMarkAcpiHal(VOID)

View file

@ -111,7 +111,7 @@ HalpSetTimerRollOver(USHORT RollOver)
__writeeflags(Flags);
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitializeClock(VOID)

View file

@ -12,6 +12,7 @@
#define NDEBUG
#include <debug.h>
INIT_FUNCTION
VOID
NTAPI
HalpGetResourceSortValue(
@ -20,6 +21,7 @@ HalpGetResourceSortValue(
OUT PLARGE_INTEGER Value
);
INIT_FUNCTION
VOID
NTAPI
HalpBuildPartialFromIdt(
@ -28,6 +30,7 @@ HalpBuildPartialFromIdt(
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor
);
INIT_FUNCTION
VOID
NTAPI
HalpBuildPartialFromAddress(
@ -97,7 +100,7 @@ ADDRESS_USAGE HalpDefaultIoSpace =
/* FUNCTIONS ******************************************************************/
#ifndef _MINIHAL_
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
@ -137,7 +140,7 @@ HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
}
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpBuildPartialFromIdt(IN ULONG Entry,
@ -175,7 +178,7 @@ HalpBuildPartialFromIdt(IN ULONG Entry,
TranslatedDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].Irql;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpBuildPartialFromAddress(IN INTERFACE_TYPE Interface,
@ -243,7 +246,7 @@ HalpBuildPartialFromAddress(IN INTERFACE_TYPE Interface,
}
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpReportResourceUsage(IN PUNICODE_STRING HalName,
@ -522,7 +525,7 @@ HalpReportResourceUsage(IN PUNICODE_STRING HalName,
}
#endif
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpRegisterVector(IN UCHAR Flags,
@ -539,7 +542,7 @@ HalpRegisterVector(IN UCHAR Flags,
}
#ifndef _MINIHAL_
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpEnableInterruptHandler(IN UCHAR Flags,
@ -562,7 +565,7 @@ HalpEnableInterruptHandler(IN UCHAR Flags,
HalEnableSystemInterrupt(SystemVector, Irql, Mode);
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpGetNMICrashFlag(VOID)

View file

@ -282,6 +282,7 @@ extern PCI_CONFIG_HANDLER PCIConfigHandler;
extern PCI_CONFIG_HANDLER PCIConfigHandlerType1;
extern PCI_CONFIG_HANDLER PCIConfigHandlerType2;
INIT_FUNCTION
PPCI_REGISTRY_INFO_INTERNAL
NTAPI
HalpQueryPciRegistryInfo(
@ -425,12 +426,14 @@ HalpSetCmosData(
IN ULONG Length
);
INIT_FUNCTION
VOID
NTAPI
HalpInitializePciBus(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpInitializePciStubs(
@ -470,6 +473,7 @@ HalpFindBusAddressTranslation(
IN BOOLEAN NextBus
);
INIT_FUNCTION
VOID
NTAPI
HalpRegisterPciDebuggingDeviceInfo(
@ -606,6 +610,7 @@ HalpTranslateIsaBusAddress(
OUT PPHYSICAL_ADDRESS TranslatedAddress
);
INIT_FUNCTION
ULONG
NTAPI
HalpGetSystemInterruptVector(

View file

@ -24,6 +24,7 @@ HalpAcpiGetTable(
IN ULONG Signature
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupAcpiPhase0(

View file

@ -4,13 +4,6 @@
#pragma once
#if defined(__GNUC__) && !defined(_MINIHAL_)
#define INIT_SECTION __attribute__((section ("INIT")))
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#endif
#ifdef CONFIG_SMP
#define HAL_BUILD_TYPE (DBG ? PRCB_BUILD_DEBUG : 0)
#else
@ -556,6 +549,7 @@ typedef struct _HalAddressUsage
PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses);
/* sysinfo.c */
INIT_FUNCTION
VOID
NTAPI
HalpRegisterVector(IN UCHAR Flags,
@ -563,6 +557,7 @@ HalpRegisterVector(IN UCHAR Flags,
IN ULONG SystemVector,
IN KIRQL Irql);
INIT_FUNCTION
VOID
NTAPI
HalpEnableInterruptHandler(IN UCHAR Flags,
@ -584,7 +579,7 @@ DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME Tr
extern BOOLEAN HalpProfilingStopped;
/* timer.c */
VOID NTAPI HalpInitializeClock(VOID);
INIT_FUNCTION VOID NTAPI HalpInitializeClock(VOID);
VOID __cdecl HalpClockInterrupt(VOID);
VOID __cdecl HalpProfileInterrupt(VOID);
@ -596,7 +591,7 @@ HalpCalibrateStallExecution(VOID);
VOID HalpInitPciBus (VOID);
/* dma.c */
VOID HalpInitDma (VOID);
INIT_FUNCTION VOID HalpInitDma (VOID);
/* Non-generic initialization */
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
@ -615,12 +610,14 @@ HalpCheckPowerButton(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpRegisterKdSupportFunctions(
VOID
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupPciDeviceForDebugging(
@ -628,6 +625,7 @@ HalpSetupPciDeviceForDebugging(
IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpReleasePciDeviceForDebugging(
@ -727,6 +725,7 @@ HaliHaltSystem(
//
// CMOS Routines
//
INIT_FUNCTION
VOID
NTAPI
HalpInitializeCmos(
@ -777,36 +776,42 @@ HalpOpenRegistryKey(
IN BOOLEAN Create
);
INIT_FUNCTION
VOID
NTAPI
HalpGetNMICrashFlag(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpGetDebugPortTable(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpReportSerialNumber(
VOID
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpMarkAcpiHal(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpBuildAddressMap(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpReportResourceUsage(
@ -814,6 +819,7 @@ HalpReportResourceUsage(
IN INTERFACE_TYPE InterfaceType
);
INIT_FUNCTION
ULONG
NTAPI
HalpIs16BitPortDecodeSupported(
@ -834,6 +840,7 @@ KeUpdateSystemTime(
IN KIRQL OldIrql
);
INIT_FUNCTION
VOID
NTAPI
HalpInitBusHandlers(
@ -846,6 +853,7 @@ HaliInitPnpDriver(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HalpDebugPciDumpBus(

View file

@ -608,7 +608,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler,
return STATUS_SUCCESS;
}
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock,
@ -618,7 +618,7 @@ HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock,
return STATUS_NOT_IMPLEMENTED;
}
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
@ -627,7 +627,7 @@ HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
return STATUS_NOT_IMPLEMENTED;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpRegisterPciDebuggingDeviceInfo(VOID)
@ -862,7 +862,7 @@ HaliPciInterfaceReadConfig(IN PBUS_HANDLER RootBusHandler,
return Length;
}
INIT_SECTION
INIT_FUNCTION
PPCI_REGISTRY_INFO_INTERNAL
NTAPI
HalpQueryPciRegistryInfo(VOID)
@ -1095,7 +1095,7 @@ HalpQueryPciRegistryInfo(VOID)
#endif
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitializePciStubs(VOID)

View file

@ -139,6 +139,7 @@ HalpGetRootInterruptVector(IN ULONG BusInterruptLevel,
return SystemVector;
}
INIT_FUNCTION
ULONG
NTAPI
HalpGetSystemInterruptVector(IN PBUS_HANDLER BusHandler,

View file

@ -12,6 +12,7 @@
#define NDEBUG
#include <debug.h>
INIT_FUNCTION
PBUS_HANDLER
NTAPI
HalpAllocateAndInitPciBusHandler(
@ -20,12 +21,14 @@ HalpAllocateAndInitPciBusHandler(
IN BOOLEAN TestAllocation
);
INIT_FUNCTION
VOID
NTAPI
HalpFixupPciSupportedRanges(
IN ULONG BusCount
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpGetChipHacks(
@ -35,6 +38,7 @@ HalpGetChipHacks(
IN PULONG HackFlags
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpGetPciBridgeConfig(
@ -42,18 +46,21 @@ HalpGetPciBridgeConfig(
IN PUCHAR BusCount
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsBridgeDevice(
IN PPCI_COMMON_CONFIG PciData
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsIdeDevice(
IN PPCI_COMMON_CONFIG PciData
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsRecognizedCard(
@ -62,6 +69,7 @@ HalpIsRecognizedCard(
IN ULONG Flags
);
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsValidPCIDevice(
@ -69,18 +77,21 @@ HalpIsValidPCIDevice(
IN PCI_SLOT_NUMBER Slot
);
INIT_FUNCTION
NTSTATUS
NTAPI
HalpMarkChipsetDecode(
IN BOOLEAN OverrideEnable
);
INIT_FUNCTION
VOID
NTAPI
HalpRegisterInternalBusHandlers(
VOID
);
INIT_FUNCTION
VOID
NTAPI
ShowSize(
@ -160,7 +171,7 @@ HalpAllocateBusHandler(IN INTERFACE_TYPE InterfaceType,
return Bus;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpRegisterInternalBusHandlers(VOID)
@ -235,7 +246,7 @@ HalpRegisterInternalBusHandlers(VOID)
}
#ifndef _MINIHAL_
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpMarkChipsetDecode(BOOLEAN OverrideEnable)
@ -283,7 +294,7 @@ HalpMarkChipsetDecode(BOOLEAN OverrideEnable)
return Status;
}
INIT_SECTION
INIT_FUNCTION
PBUS_HANDLER
NTAPI
HalpAllocateAndInitPciBusHandler(IN ULONG PciType,
@ -368,7 +379,7 @@ HalpAllocateAndInitPciBusHandler(IN ULONG PciType,
return Bus;
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsValidPCIDevice(IN PBUS_HANDLER BusHandler,
@ -430,7 +441,7 @@ HalpIsValidPCIDevice(IN PBUS_HANDLER BusHandler,
static BOOLEAN WarningsGiven[5];
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpGetChipHacks(IN USHORT VendorId,
@ -494,7 +505,7 @@ HalpGetChipHacks(IN USHORT VendorId,
return Status;
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsRecognizedCard(IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo,
@ -575,7 +586,7 @@ HalpIsRecognizedCard(IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo,
return FALSE;
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsIdeDevice(IN PPCI_COMMON_CONFIG PciData)
@ -628,7 +639,7 @@ HalpIsIdeDevice(IN PPCI_COMMON_CONFIG PciData)
return FALSE;
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpIsBridgeDevice(IN PPCI_COMMON_CONFIG PciData)
@ -642,7 +653,7 @@ HalpIsBridgeDevice(IN PPCI_COMMON_CONFIG PciData)
(PciData->SubClass == PCI_SUBCLASS_BR_CARDBUS)));
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpGetPciBridgeConfig(IN ULONG PciType,
@ -695,7 +706,7 @@ HalpGetPciBridgeConfig(IN ULONG PciType,
return FALSE;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpFixupPciSupportedRanges(IN ULONG BusCount)
@ -758,7 +769,7 @@ HalpFixupPciSupportedRanges(IN ULONG BusCount)
}
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
ShowSize(ULONG x)
@ -790,7 +801,7 @@ ShowSize(ULONG x)
*/
#include "pci_classes.h"
#include "pci_vendors.h"
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpDebugPciDumpBus(IN ULONG i,
@ -943,7 +954,7 @@ HalpDebugPciDumpBus(IN ULONG i,
}
#endif
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitializePciBus(VOID)
@ -1182,7 +1193,7 @@ HalpInitializePciBus(VOID)
#endif
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpInitBusHandlers(VOID)
@ -1191,7 +1202,7 @@ HalpInitBusHandlers(VOID)
HalpRegisterInternalBusHandlers();
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpRegisterKdSupportFunctions(VOID)

View file

@ -30,7 +30,7 @@ PWCHAR HalName = L"PC Compatible Eisa/Isa HAL";
/* PRIVATE FUNCTIONS **********************************************************/
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
@ -39,7 +39,7 @@ HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return STATUS_NO_SUCH_DEVICE;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalpBuildAddressMap(VOID)
@ -51,7 +51,7 @@ HalpBuildAddressMap(VOID)
//HalpAddROMRanges();
}
INIT_SECTION
INIT_FUNCTION
BOOLEAN
NTAPI
HalpGetDebugPortTable(VOID)
@ -60,7 +60,7 @@ HalpGetDebugPortTable(VOID)
return FALSE;
}
INIT_SECTION
INIT_FUNCTION
ULONG
NTAPI
HalpIs16BitPortDecodeSupported(VOID)
@ -70,7 +70,7 @@ HalpIs16BitPortDecodeSupported(VOID)
}
#if 0
INIT_SECTION
INIT_FUNCTION
NTSTATUS
NTAPI
HaliInitPnpDriver(VOID)
@ -84,7 +84,7 @@ HaliInitPnpDriver(VOID)
/*
* @implemented
*/
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
HalReportResourceUsage(VOID)

View file

@ -34,6 +34,7 @@ HalpInitPhase1(VOID)
{
}
INIT_FUNCTION
NTSTATUS
NTAPI
HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)

View file

@ -38,6 +38,7 @@ typedef struct _NOCC_CACHE_MAP
ULONG ReadAheadGranularity;
} NOCC_CACHE_MAP, *PNOCC_CACHE_MAP;
INIT_FUNCTION
VOID
NTAPI
CcPfInitializePrefetcher(VOID);
@ -53,6 +54,7 @@ CcMdlWriteComplete2(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain);
INIT_FUNCTION
VOID
NTAPI
CcInitView(VOID);
@ -62,6 +64,7 @@ NTAPI
CcpUnpinData(PNOCC_BCB Bcb,
BOOLEAN ActuallyRelease);
INIT_FUNCTION
BOOLEAN
NTAPI
CcInitializeCacheManager(VOID);

View file

@ -22,9 +22,9 @@ static ULONG BugCheckFileId = 0x4 << 16;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CcPfInitializePrefetcher(VOID)
{
/* Notify debugger */
@ -40,9 +40,9 @@ CcPfInitializePrefetcher(VOID)
/* FIXME: Setup the rest of the prefetecher */
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CcInitializeCacheManager(VOID)
{
ULONG Thread;

View file

@ -23,9 +23,9 @@ LIST_ENTRY CmpFreeDelayItemsListHead;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitCmPrivateAlloc(VOID)
{
/* Make sure we didn't already do this */
@ -38,9 +38,9 @@ CmpInitCmPrivateAlloc(VOID)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitCmPrivateDelayAlloc(VOID)
{
/* Initialize the delay allocation list and lock */

View file

@ -19,9 +19,9 @@ extern ULONG InitSafeBootMode;
/* FUNCTIONS ******************************************************************/
INIT_FUNCTION
HCELL_INDEX
NTAPI
INIT_FUNCTION
CmpFindControlSet(IN PHHIVE SystemHive,
IN HCELL_INDEX RootCell,
IN PUNICODE_STRING SelectKeyName,
@ -129,9 +129,9 @@ CmpFindControlSet(IN PHHIVE SystemHive,
return ControlSetCell;
}
INIT_FUNCTION
ULONG
NTAPI
INIT_FUNCTION
CmpFindTagIndex(IN PHHIVE Hive,
IN HCELL_INDEX TagCell,
IN HCELL_INDEX GroupOrderCell,
@ -179,9 +179,9 @@ CmpFindTagIndex(IN PHHIVE Hive,
return -2;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpAddDriverToList(IN PHHIVE Hive,
IN HCELL_INDEX DriverCell,
IN HCELL_INDEX GroupOrderCell,
@ -346,9 +346,9 @@ CmpAddDriverToList(IN PHHIVE Hive,
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpIsLoadType(IN PHHIVE Hive,
IN HCELL_INDEX Cell,
IN SERVICE_LOAD_TYPE LoadType)
@ -377,9 +377,9 @@ CmpIsLoadType(IN PHHIVE Hive,
return (*Data == LoadType);
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpFindDrivers(IN PHHIVE Hive,
IN HCELL_INDEX ControlSet,
IN SERVICE_LOAD_TYPE LoadType,
@ -499,9 +499,9 @@ CmpFindDrivers(IN PHHIVE Hive,
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpDoSort(IN PLIST_ENTRY DriverListHead,
IN PUNICODE_STRING OrderList)
{
@ -556,9 +556,9 @@ CmpDoSort(IN PLIST_ENTRY DriverListHead,
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpSortDriverList(IN PHHIVE Hive,
IN HCELL_INDEX ControlSet,
IN PLIST_ENTRY DriverListHead)
@ -605,9 +605,9 @@ CmpSortDriverList(IN PHHIVE Hive,
return CmpDoSort(DriverListHead, &DependList);
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpOrderGroup(IN PBOOT_DRIVER_NODE StartNode,
IN PBOOT_DRIVER_NODE EndNode)
{
@ -668,9 +668,9 @@ CmpOrderGroup(IN PBOOT_DRIVER_NODE StartNode,
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead)
{
PLIST_ENTRY NextEntry;
@ -718,9 +718,9 @@ CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpIsSafe(IN PHHIVE Hive,
IN HCELL_INDEX SafeBootCell,
IN HCELL_INDEX DriverCell)

View file

@ -14,9 +14,9 @@
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
IN HANDLE NodeHandle,
OUT PHANDLE NewHandle,
@ -199,9 +199,9 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
IN HANDLE ParentHandle,
IN INTERFACE_TYPE InterfaceType,
@ -322,9 +322,9 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry,
return STATUS_SUCCESS;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
NTSTATUS Status;

View file

@ -16,9 +16,9 @@
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
LANGID
NTAPI
INIT_FUNCTION
CmpConvertLangId(IN LPWSTR Name,
IN ULONG NameLength)
{
@ -67,9 +67,9 @@ CmpConvertLangId(IN LPWSTR Name,
return LangId;
}
INIT_FUNCTION
HCELL_INDEX
NTAPI
INIT_FUNCTION
CmpWalkPath(IN PHHIVE SystemHive,
IN HCELL_INDEX ParentCell,
IN LPWSTR Path)
@ -98,9 +98,9 @@ CmpWalkPath(IN PHHIVE SystemHive,
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmGetSystemControlValues(IN PVOID SystemHiveData,
IN PCM_SYSTEM_CONTROL_VECTOR ControlVector)
{

View file

@ -65,7 +65,7 @@ ULONG CmpTypeCount[MaximumType + 1];
HANDLE CmpRegistryRootHandle;
INIT_FUNCTION UNICODE_STRING CmClassName[MaximumClass + 1] =
INIT_SECTION UNICODE_STRING CmClassName[MaximumClass + 1] =
{
RTL_CONSTANT_STRING(L"System"),
RTL_CONSTANT_STRING(L"Processor"),
@ -77,7 +77,7 @@ INIT_FUNCTION UNICODE_STRING CmClassName[MaximumClass + 1] =
RTL_CONSTANT_STRING(L"Undefined")
};
INIT_FUNCTION UNICODE_STRING CmTypeName[MaximumType + 1] =
INIT_SECTION UNICODE_STRING CmTypeName[MaximumType + 1] =
{
RTL_CONSTANT_STRING(L"System"),
RTL_CONSTANT_STRING(L"CentralProcessor"),
@ -123,7 +123,7 @@ INIT_FUNCTION UNICODE_STRING CmTypeName[MaximumType + 1] =
RTL_CONSTANT_STRING(L"Undefined")
};
INIT_FUNCTION CMP_MF_TYPE CmpMultifunctionTypes[] =
INIT_SECTION CMP_MF_TYPE CmpMultifunctionTypes[] =
{
{"ISA", Isa, 0},
{"MCA", MicroChannel, 0},
@ -136,7 +136,7 @@ INIT_FUNCTION CMP_MF_TYPE CmpMultifunctionTypes[] =
{NULL, Internal, 0}
};
INIT_FUNCTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
{
{
L"Session Manager",

View file

@ -185,9 +185,9 @@ CmpDelayCloseWorker(IN PVOID Context)
CmpUnlockRegistry();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitializeDelayedCloseTable(VOID)
{
@ -262,9 +262,9 @@ CmpDelayDerefKCBWorker(IN PVOID Context)
CmpUnlockRegistry();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitDelayDerefKCBEngine(VOID)
{
/* Initialize lock and list */

View file

@ -32,9 +32,9 @@ typedef struct _REGISTRY_CALLBACK
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitCallback(VOID)
{
ULONG i;

View file

@ -20,9 +20,9 @@ PCM_NAME_HASH_TABLE_ENTRY CmpNameCacheTable;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpInitializeCache(VOID)
{
ULONG Length, i;

View file

@ -391,9 +391,9 @@ CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName,
return STATUS_SUCCESS;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpSetSystemValues(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
NTSTATUS Status;
@ -446,9 +446,9 @@ Quit:
return Status;
}
INIT_FUNCTION
static
NTSTATUS
INIT_FUNCTION
CmpCreateHardwareProfile(HANDLE ControlSetHandle)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@ -518,9 +518,9 @@ done:
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
UNICODE_STRING ConfigName = RTL_CONSTANT_STRING(L"Control\\IDConfigDB");
@ -859,9 +859,9 @@ CmpLinkHiveToMaster(IN PUNICODE_STRING LinkName,
return STATUS_SUCCESS;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
static const UNICODE_STRING HiveName = RTL_CONSTANT_STRING(L"SYSTEM");
@ -976,9 +976,9 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return TRUE;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
CmpCreateObjectTypes(VOID)
{
OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
@ -1010,9 +1010,9 @@ CmpCreateObjectTypes(VOID)
return ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &CmpKeyObjectType);
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpCreateRootNode(IN PHHIVE Hive,
IN PCWSTR Name,
OUT PHCELL_INDEX Index)
@ -1066,9 +1066,9 @@ CmpCreateRootNode(IN PHHIVE Hive,
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmpCreateRegistryRoot(VOID)
{
UNICODE_STRING KeyName;
@ -1511,9 +1511,9 @@ CmpInitializeHiveList(VOID)
CmpNoVolatileCreates = TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
CmInitSystem1(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@ -1727,9 +1727,9 @@ CmInitSystem1(VOID)
return TRUE;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
CmpFreeDriverList(IN PHHIVE Hive,
IN PLIST_ENTRY DriverList)
{
@ -1776,9 +1776,9 @@ CmpFreeDriverList(IN PHHIVE Hive,
}
}
INIT_FUNCTION
PUNICODE_STRING*
NTAPI
INIT_FUNCTION
CmGetSystemDriverList(VOID)
{
LIST_ENTRY DriverList;

View file

@ -22,9 +22,9 @@ EX_PUSH_LOCK HandleTableListLock;
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpInitializeHandleTables(VOID)
{
/* Initialize the list of handle tables and the lock */

View file

@ -183,9 +183,9 @@ HdlspEnableTerminal(IN BOOLEAN Enable)
return STATUS_SUCCESS;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
HeadlessInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PHEADLESS_LOADER_BLOCK HeadlessBlock;

View file

@ -91,9 +91,9 @@ BOOLEAN ExpRealTimeIsUniversal;
/* FUNCTIONS ****************************************************************/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ExpCreateSystemRootLink(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
UNICODE_STRING LinkName;
@ -203,9 +203,9 @@ ExpCreateSystemRootLink(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return STATUS_SUCCESS;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
LARGE_INTEGER SectionSize;
@ -379,9 +379,9 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
ExpNlsTableBase = SectionBase;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer,
OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
OUT PCHAR *ProcessEnvironment)
@ -596,9 +596,9 @@ ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer,
*ProcessEnvironment = EnvironmentPtr;
}
INIT_FUNCTION
ULONG
NTAPI
INIT_FUNCTION
ExComputeTickCountMultiplier(IN ULONG ClockIncrement)
{
ULONG MsRemainder = 0, MsIncrement;
@ -629,9 +629,9 @@ ExComputeTickCountMultiplier(IN ULONG ClockIncrement)
return (MsIncrement << 24) | MsRemainder;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
ExpInitSystemPhase0(VOID)
{
/* Initialize EXRESOURCE Support */
@ -652,9 +652,9 @@ ExpInitSystemPhase0(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
ExpInitSystemPhase1(VOID)
{
/* Initialize worker threads */
@ -729,9 +729,9 @@ ExpInitSystemPhase1(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
ExInitSystem(VOID)
{
/* Check the initialization phase */
@ -755,9 +755,9 @@ ExInitSystem(VOID)
}
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
ExpIsLoaderValid(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLOADER_PARAMETER_EXTENSION Extension;
@ -781,9 +781,9 @@ ExpIsLoaderValid(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return TRUE;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
ULONG i = 0;
@ -862,9 +862,9 @@ ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN ULONG_PTR PagesToDestroy,
IN TYPE_OF_MEMORY MemoryType)
@ -908,9 +908,9 @@ ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpInitializeExecutive(IN ULONG Cpu,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
@ -1327,9 +1327,9 @@ VOID
NTAPI
MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock);
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
Phase1InitializationDiscard(IN PVOID Context)
{
PLOADER_PARAMETER_BLOCK LoaderBlock = Context;

View file

@ -29,9 +29,9 @@ GENERAL_LOOKASIDE ExpSmallPagedPoolLookasideLists[MAXIMUM_PROCESSORS];
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List,
IN POOL_TYPE Type,
IN ULONG Size,
@ -57,9 +57,9 @@ ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List,
List->LastAllocateHits = 0;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExInitPoolLookasidePointers(VOID)
{
ULONG i;
@ -87,9 +87,9 @@ ExInitPoolLookasidePointers(VOID)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpInitLookasideLists(VOID)
{
ULONG i;

View file

@ -39,9 +39,9 @@ ULONG ExPushLockSpinCount = 0;
* @remarks The ExpInitializePushLocks routine sets up the spin on SMP machines.
*
*--*/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpInitializePushLocks(VOID)
{
#ifdef CONFIG_SMP

View file

@ -163,9 +163,9 @@ ExpCheckForApcsDisabled(IN KIRQL Irql,
* @remarks This routine should only be called once, during system startup.
*
*--*/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExpResourceInitialization(VOID)
{
/* Setup the timeout */

View file

@ -25,9 +25,9 @@ XIPDispatch(IN ULONG DispatchCode,
return STATUS_NOT_IMPLEMENTED;
}
INIT_FUNCTION
PMEMORY_ALLOCATION_DESCRIPTOR
NTAPI
INIT_FUNCTION
XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY NextEntry;
@ -49,9 +49,9 @@ XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return NULL;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose, XipRam;

View file

@ -16,7 +16,7 @@
PERESOURCE FsRtlPagingIoResources;
ULONG FsRtlPagingIoResourceSelector;
NTSTATUS NTAPI INIT_FUNCTION FsRtlInitializeWorkerThread(VOID);
INIT_FUNCTION NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID);
extern KSEMAPHORE FsRtlpUncSemaphore;
static const UCHAR LegalAnsiCharacterArray[] =
@ -155,9 +155,9 @@ const UCHAR * const FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
FsRtlInitSystem(VOID)
{
ULONG i;

View file

@ -144,9 +144,9 @@ FsRtlWorkerThread(IN PVOID StartContext)
/*
* @implemented
*/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
FsRtlInitializeWorkerThread(VOID)
{
ULONG_PTR i;

View file

@ -212,9 +212,9 @@ BootLogoFadeIn(VOID)
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
PVOID
NTAPI
INIT_FUNCTION
FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN ULONG ResourceId)
{
@ -277,9 +277,9 @@ FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
return Data;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN ULONG Count)
{
@ -357,9 +357,9 @@ InbvReleaseLock(VOID)
if (InbvOldIrql <= DISPATCH_LEVEL) KeLowerIrql(OldIrql);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
InbvEnableBootDriver(IN BOOLEAN Enable)
{
/* Check if we're installed */
@ -622,9 +622,9 @@ InbvSolidColorFill(IN ULONG Left,
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
InbvUpdateProgressBar(IN ULONG Progress)
{
ULONG FillCount, BoundedProgress;
@ -738,9 +738,9 @@ InbvSetProgressBarSubset(IN ULONG Floor,
InbvProgressState.Bias = (Ceiling * 100) - Floor;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
InbvIndicateProgress(VOID)
{
ULONG Percentage;
@ -930,9 +930,9 @@ InbvRotationThread(
PsTerminateSystemThread(STATUS_SUCCESS);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
InbvRotBarInit(VOID)
{
PltRotBarStatus = RBS_FADEIN;
@ -940,9 +940,9 @@ InbvRotBarInit(VOID)
}
#endif
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
DisplayBootBitmap(IN BOOLEAN TextMode)
{
PVOID Header = NULL, Footer = NULL, Screen = NULL;
@ -1185,9 +1185,9 @@ DisplayBootBitmap(IN BOOLEAN TextMode)
#endif
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
DisplayFilter(PCHAR *String)
{
/* Windows hack to skip first dots */
@ -1209,9 +1209,9 @@ DisplayFilter(PCHAR *String)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
FinalizeBootLogo(VOID)
{
/* Acquire lock and check the display state */

View file

@ -289,6 +289,7 @@ MI_IS_MAPPED_PTE(PMMPTE PointerPte)
return ((PointerPte->u.Long & 0xFFFFFC01) != 0);
}
INIT_FUNCTION
VOID
FORCEINLINE
MmInitGlobalKernelPageDirectory(VOID)

View file

@ -288,6 +288,7 @@ extern LAZY_WRITER LazyWriter;
#define NODE_TYPE_PRIVATE_MAP 0x02FE
#define NODE_TYPE_SHARED_MAP 0x02FF
INIT_FUNCTION
VOID
NTAPI
CcPfInitializePrefetcher(
@ -324,6 +325,7 @@ CcRosGetVacb(
PROS_VACB *Vacb
);
INIT_FUNCTION
VOID
NTAPI
CcInitView(VOID);
@ -340,6 +342,7 @@ NTSTATUS
NTAPI
CcWriteVirtualAddress(PROS_VACB Vacb);
INIT_FUNCTION
BOOLEAN
NTAPI
CcInitializeCacheManager(VOID);

View file

@ -694,6 +694,7 @@ CmpFlushNotify(
IN BOOLEAN LockHeld
);
INIT_FUNCTION
VOID
NTAPI
CmpInitCallback(
@ -703,24 +704,28 @@ CmpInitCallback(
//
// KCB Cache/Delay Routines
//
INIT_FUNCTION
VOID
NTAPI
CmpInitializeCache(
VOID
);
INIT_FUNCTION
VOID
NTAPI
CmpInitCmPrivateDelayAlloc(
VOID
);
INIT_FUNCTION
VOID
NTAPI
CmpInitCmPrivateAlloc(
VOID
);
INIT_FUNCTION
VOID
NTAPI
CmpInitDelayDerefKCBEngine(
@ -963,6 +968,7 @@ VOID
NTAPI
CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb);
INIT_FUNCTION
VOID
NTAPI
CmpInitializeDelayedCloseTable(
@ -1161,6 +1167,7 @@ CmpCreateLinkNode(
//
// Boot Routines
//
INIT_FUNCTION
HCELL_INDEX
NTAPI
CmpFindControlSet(
@ -1170,6 +1177,7 @@ CmpFindControlSet(
OUT PBOOLEAN AutoSelect
);
INIT_FUNCTION
VOID
NTAPI
CmGetSystemControlValues(
@ -1186,6 +1194,7 @@ CmpSaveBootControlSet(
//
// Hardware Configuration Routines
//
INIT_FUNCTION
NTSTATUS
NTAPI
CmpInitializeRegistryNode(
@ -1203,6 +1212,7 @@ CmpInitializeMachineDependentConfiguration(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
NTSTATUS
NTAPI
CmpInitializeHardwareConfiguration(
@ -1407,6 +1417,7 @@ CmSaveMergedKeys(
//
// Startup and Shutdown
//
INIT_FUNCTION
BOOLEAN
NTAPI
CmInitSystem1(
@ -1434,12 +1445,14 @@ CmpSetVersionData(
//
// Driver List Routines
//
INIT_FUNCTION
PUNICODE_STRING*
NTAPI
CmGetSystemDriverList(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
CmpFindDrivers(
@ -1450,7 +1463,7 @@ CmpFindDrivers(
IN PLIST_ENTRY DriverListHead
);
INIT_FUNCTION
BOOLEAN
NTAPI
CmpSortDriverList(
@ -1459,12 +1472,14 @@ CmpSortDriverList(
IN PLIST_ENTRY DriverListHead
);
INIT_FUNCTION
BOOLEAN
NTAPI
CmpResolveDriverDependencies(
IN PLIST_ENTRY DriverListHead
);
INIT_FUNCTION
BOOLEAN
NTAPI
CmpIsSafe(

View file

@ -46,6 +46,7 @@
#define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
#endif
INIT_FUNCTION
VOID
NTAPI
DbgkInitialize(

View file

@ -169,6 +169,7 @@ ExGetPoolTagInfo(
/* INITIALIZATION FUNCTIONS *************************************************/
INIT_FUNCTION
BOOLEAN
NTAPI
ExpWin32kInit(VOID);
@ -183,6 +184,7 @@ Phase1Initialization(
IN PVOID Context
);
INIT_FUNCTION
VOID
NTAPI
ExpInitializePushLocks(VOID);
@ -193,6 +195,7 @@ ExRefreshTimeZoneInformation(
IN PLARGE_INTEGER SystemBootTime
);
INIT_FUNCTION
VOID
NTAPI
ExpInitializeWorkerThreads(VOID);
@ -201,10 +204,12 @@ VOID
NTAPI
ExSwapinWorkerThreads(IN BOOLEAN AllowSwap);
INIT_FUNCTION
VOID
NTAPI
ExpInitLookasideLists(VOID);
INIT_FUNCTION
VOID
NTAPI
ExInitializeSystemLookasideList(
@ -216,14 +221,17 @@ ExInitializeSystemLookasideList(
IN PLIST_ENTRY ListHead
);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeCallbacks(VOID);
INIT_FUNCTION
VOID
NTAPI
ExpInitUuids(VOID);
INIT_FUNCTION
VOID
NTAPI
ExpInitializeExecutive(
@ -235,38 +243,47 @@ VOID
NTAPI
ExShutdownSystem(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeEventImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeKeyedEventImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeEventPairImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeSemaphoreImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeMutantImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeTimerImplementation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
ExpInitializeProfileImplementation(VOID);
INIT_FUNCTION
VOID
NTAPI
ExpResourceInitialization(VOID);
INIT_FUNCTION
VOID
NTAPI
ExInitPoolLookasidePointers(VOID);
@ -406,6 +423,7 @@ typedef BOOLEAN
ULONG_PTR Context
);
INIT_FUNCTION
VOID
NTAPI
ExpInitializeHandleTables(
@ -1461,12 +1479,14 @@ ExTimerRundown(
VOID
);
INIT_FUNCTION
VOID
NTAPI
HeadlessInit(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
VOID
NTAPI
XIPInit(

View file

@ -108,12 +108,14 @@ typedef struct _INT_MAPPING
//
// Initialization Routines
//
INIT_FUNCTION
VOID
NTAPI
FsRtlInitializeLargeMcbs(
VOID
);
INIT_FUNCTION
VOID
NTAPI
FsRtlInitializeTunnels(
@ -129,6 +131,7 @@ FsRtlPTeardownPerFileObjectContexts(
IN PFILE_OBJECT FileObject
);
INIT_FUNCTION
BOOLEAN
NTAPI
FsRtlInitSystem(

View file

@ -321,6 +321,7 @@ KiSetTebBase(PKPCR Pcr, PVOID TebAddress)
Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress);
}
INIT_FUNCTION
VOID
FASTCALL
Ki386InitializeTss(
@ -329,30 +330,36 @@ Ki386InitializeTss(
IN PKGDTENTRY Gdt
);
INIT_FUNCTION
VOID
NTAPI
KiSetCR0Bits(VOID);
INIT_FUNCTION
VOID
NTAPI
KiGetCacheInformation(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
KiIsNpxPresent(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
KiIsNpxErrataPresent(
VOID
);
INIT_FUNCTION
VOID
NTAPI
KiSetProcessorType(VOID);
INIT_FUNCTION
ULONG
NTAPI
KiGetFeatureBits(VOID);
@ -387,18 +394,21 @@ Ki386SetupAndExitToV86Mode(
OUT PTEB VdmTeb
);
INIT_FUNCTION
VOID
NTAPI
KeI386VdmInitialize(
VOID
);
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableGlobalPage(
IN ULONG_PTR Context
);
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableTargetLargePage(
@ -426,48 +436,56 @@ Ki386EnableCurrentLargePage(
IN ULONG Cr3
);
INIT_FUNCTION
VOID
NTAPI
KiI386PentiumLockErrataFixup(
VOID
);
INIT_FUNCTION
VOID
NTAPI
KiInitializePAT(
VOID
);
INIT_FUNCTION
VOID
NTAPI
KiInitializeMTRR(
IN BOOLEAN FinalCpu
);
INIT_FUNCTION
VOID
NTAPI
KiAmdK6InitializeMTRR(
VOID
);
INIT_FUNCTION
VOID
NTAPI
KiRestoreFastSyscallReturnState(
VOID
);
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableDE(
IN ULONG_PTR Context
);
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableFxsr(
IN ULONG_PTR Context
);
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableXMMIExceptions(
@ -791,11 +809,12 @@ KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame)
//
// Switches from boot loader to initial kernel stack
//
INIT_FUNCTION
FORCEINLINE
VOID
KiSwitchToBootStack(IN ULONG_PTR InitialStack)
{
VOID NTAPI KiSystemStartupBootStack(VOID);
INIT_FUNCTION VOID NTAPI KiSystemStartupBootStack(VOID);
/* We have to switch to a new stack before continuing kernel initialization */
#ifdef __GNUC__

View file

@ -21,18 +21,21 @@ typedef enum _ROT_BAR_TYPE
RB_PROGRESS_BAR
} ROT_BAR_TYPE;
INIT_FUNCTION
VOID
NTAPI
InbvUpdateProgressBar(
IN ULONG Progress
);
INIT_FUNCTION
VOID
NTAPI
InbvRotBarInit(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
InbvDriverInitialize(
@ -40,24 +43,28 @@ InbvDriverInitialize(
IN ULONG Count
);
INIT_FUNCTION
VOID
NTAPI
InbvEnableBootDriver(
IN BOOLEAN Enable
);
INIT_FUNCTION
VOID
NTAPI
DisplayBootBitmap(
IN BOOLEAN TextMode
);
INIT_FUNCTION
VOID
NTAPI
DisplayFilter(
IN PCHAR *String
);
INIT_FUNCTION
VOID
NTAPI
FinalizeBootLogo(
@ -78,6 +85,7 @@ InbvBitBlt(
IN ULONG Y
);
INIT_FUNCTION
VOID
NTAPI
InbvIndicateProgress(

View file

@ -577,6 +577,7 @@ PipCallDriverAddDevice(
IN PDRIVER_OBJECT DriverObject
);
INIT_FUNCTION
NTSTATUS
NTAPI
IopInitializePlugPlayServices(
@ -692,6 +693,7 @@ IoDestroyDriverList(
VOID
);
INIT_FUNCTION
NTSTATUS
IopInitPlugPlayEvents(VOID);
@ -740,12 +742,14 @@ IopTraverseDeviceTree(
//
// PnP Routines
//
INIT_FUNCTION
NTSTATUS
NTAPI
IopUpdateRootKey(
VOID
);
INIT_FUNCTION
NTSTATUS
NTAPI
PiInitCacheGroupInformation(
@ -783,12 +787,14 @@ PnpRegSzToString(
//
// Initialization Routines
//
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNames(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
NTSTATUS
NTAPI
IopReassignSystemRoot(
@ -796,6 +802,7 @@ IopReassignSystemRoot(
OUT PANSI_STRING NtBootPath
);
INIT_FUNCTION
BOOLEAN
NTAPI
IoInitSystem(
@ -986,11 +993,13 @@ IopShutdownBaseFileSystems(
//
// Boot logging support
//
INIT_FUNCTION
VOID
IopInitBootLog(
IN BOOLEAN StartBootLog
);
INIT_FUNCTION
VOID
IopStartBootLog(
VOID
@ -1062,6 +1071,7 @@ RawFsIsRawFileSystemDeviceObject(
IN PDEVICE_OBJECT DeviceObject
);
INIT_FUNCTION
NTSTATUS
NTAPI
RawFsDriverEntry(
@ -1094,12 +1104,14 @@ PnpRootRegisterDevice(
//
// Driver Routines
//
INIT_FUNCTION
VOID
FASTCALL
IopInitializeBootDrivers(
VOID
);
INIT_FUNCTION
VOID
FASTCALL
IopInitializeSystemDrivers(
@ -1356,6 +1368,7 @@ IoSetIoCompletion(
//
// Ramdisk Routines
//
INIT_FUNCTION
NTSTATUS
NTAPI
IopStartRamdisk(

View file

@ -724,10 +724,12 @@ KeQueryValuesProcess(IN PKPROCESS Process,
/* INITIALIZATION FUNCTIONS *************************************************/
INIT_FUNCTION
BOOLEAN
NTAPI
KeInitSystem(VOID);
INIT_FUNCTION
VOID
NTAPI
KeInitExceptions(VOID);
@ -736,10 +738,12 @@ VOID
NTAPI
KeInitInterrupts(VOID);
INIT_FUNCTION
VOID
NTAPI
KiInitializeBugCheck(VOID);
INIT_FUNCTION
VOID
NTAPI
KiSystemStartup(
@ -900,6 +904,7 @@ KiChainedDispatch(
IN PKINTERRUPT Interrupt
);
INIT_FUNCTION
VOID
NTAPI
KiInitializeMachineType(
@ -917,6 +922,7 @@ KiSetupStackAndInitializeKernel(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
VOID
NTAPI
KiInitSpinLocks(
@ -924,6 +930,7 @@ KiInitSpinLocks(
IN CCHAR Number
);
INIT_FUNCTION
LARGE_INTEGER
NTAPI
KiComputeReciprocal(
@ -931,6 +938,7 @@ KiComputeReciprocal(
OUT PUCHAR Shift
);
INIT_FUNCTION
VOID
NTAPI
KiInitSystem(
@ -959,6 +967,7 @@ KiCallbackReturn(
IN NTSTATUS Status
);
INIT_FUNCTION
VOID
NTAPI
KiInitMachineDependent(VOID);

View file

@ -137,6 +137,7 @@ LpcExitThread(
//
// Initialization functions
//
INIT_FUNCTION
BOOLEAN
NTAPI
LpcInitSystem(

View file

@ -559,6 +559,7 @@ MiCheckAllProcessMemoryAreas(VOID);
/* npool.c *******************************************************************/
INIT_FUNCTION
VOID
NTAPI
MiInitializeNonPagedPool(VOID);
@ -609,6 +610,7 @@ MmInit1(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
MmInitSystem(IN ULONG Phase,
@ -625,6 +627,7 @@ VOID
NTAPI
MmFreeSwapPage(SWAPENTRY Entry);
INIT_FUNCTION
VOID
NTAPI
MmInitPagingFile(VOID);
@ -793,6 +796,7 @@ MmDeleteKernelStack(PVOID Stack,
/* balace.c ******************************************************************/
INIT_FUNCTION
VOID
NTAPI
MmInitializeMemoryConsumer(
@ -800,6 +804,7 @@ MmInitializeMemoryConsumer(
NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
);
INIT_FUNCTION
VOID
NTAPI
MmInitializeBalancer(
@ -822,6 +827,7 @@ MmRequestPageMemoryConsumer(
PPFN_NUMBER AllocatedPage
);
INIT_FUNCTION
VOID
NTAPI
MiInitBalancerThread(VOID);
@ -867,6 +873,7 @@ MmDeleteRmap(
PVOID Address
);
INIT_FUNCTION
VOID
NTAPI
MmInitializeRmapList(VOID);
@ -1076,6 +1083,7 @@ MmIsDisabledPage(
PVOID Address
);
INIT_FUNCTION
VOID
NTAPI
MmInitGlobalKernelPageDirectory(VOID);
@ -1178,6 +1186,7 @@ MmCreateProcessAddressSpace(
IN PULONG_PTR DirectoryTableBase
);
INIT_FUNCTION
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(
@ -1185,7 +1194,7 @@ MmInitializeHandBuiltProcess(
IN PULONG_PTR DirectoryTableBase
);
INIT_FUNCTION
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess2(
@ -1305,6 +1314,7 @@ MmProtectSectionView(
PULONG OldProtect
);
INIT_FUNCTION
NTSTATUS
NTAPI
MmInitSectionImplementation(VOID);
@ -1327,6 +1337,7 @@ MmPageOutSectionView(
ULONG_PTR Entry
);
INIT_FUNCTION
NTSTATUS
NTAPI
MmCreatePhysicalMemorySection(VOID);
@ -1345,12 +1356,14 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject);
/* sysldr.c ******************************************************************/
INIT_FUNCTION
VOID
NTAPI
MiReloadBootLoadedDrivers(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
BOOLEAN
NTAPI
MiInitializeLoadedModuleList(

View file

@ -1,15 +1,6 @@
#pragma once
/*
* Use these to place a function in a specific section of the executable
*/
#ifdef __GNUC__
#define INIT_SECTION __attribute__((section ("INIT")))
#define INIT_FUNCTION INIT_SECTION
#else
#define INIT_SECTION /* Done via alloc_text for MSC */
#define INIT_FUNCTION INIT_SECTION
#endif
#include <section_attribs.h>

View file

@ -159,6 +159,7 @@ typedef struct _OB_TEMP_BUFFER
//
// Startup and Shutdown Functions
//
INIT_FUNCTION
BOOLEAN
NTAPI
ObInitSystem(
@ -421,6 +422,7 @@ ObInheritDeviceMap(
IN PEPROCESS Process
);
INIT_FUNCTION
NTSTATUS
NTAPI
ObpCreateDosDevicesDirectory(
@ -430,6 +432,7 @@ ObpCreateDosDevicesDirectory(
//
// Security descriptor cache functions
//
INIT_FUNCTION
NTSTATUS
NTAPI
ObpInitSdCache(

View file

@ -264,12 +264,14 @@ typedef struct _POP_SHUTDOWN_WAIT_ENTRY
//
// Initialization routines
//
INIT_FUNCTION
BOOLEAN
NTAPI
PoInitSystem(
IN ULONG BootPhase
);
INIT_FUNCTION
VOID
NTAPI
PoInitializePrcb(

View file

@ -90,6 +90,7 @@ PspShutdownProcessManager(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
PsInitSystem(
@ -120,6 +121,7 @@ PspMapSystemDll(
IN BOOLEAN UseLargePages
);
INIT_FUNCTION
NTSTATUS
NTAPI
PsLocateSystemDll(
@ -352,6 +354,7 @@ PspRemoveProcessFromJob(
IN PEJOB Job
);
INIT_FUNCTION
VOID
NTAPI
PspInitializeJobStructures(
@ -415,6 +418,7 @@ PspIsProcessExiting(IN PEPROCESS Process);
//
// Apphelp functions
//
INIT_FUNCTION
NTSTATUS
NTAPI
ApphelpCacheInitialize(VOID);

View file

@ -243,26 +243,32 @@ SepSidInTokenEx(
);
/* Functions */
INIT_FUNCTION
BOOLEAN
NTAPI
SeInitSystem(VOID);
INIT_FUNCTION
VOID
NTAPI
ExpInitLuid(VOID);
INIT_FUNCTION
VOID
NTAPI
SepInitPrivileges(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitSecurityIDs(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitDACLs(VOID);
INIT_FUNCTION
BOOLEAN
NTAPI
SepInitSDs(VOID);
@ -329,6 +335,7 @@ SepCreateImpersonationTokenDacl(
_Out_ PACL* Dacl
);
INIT_FUNCTION
VOID
NTAPI
SepInitializeTokenImplementation(VOID);

View file

@ -22,22 +22,22 @@ extern BOOLEAN IoRemoteBootClient;
/* FUNCTIONS *****************************************************************/
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNamesCd(IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN BOOLEAN SingleDisk,
IN PBOOLEAN FoundBoot
);
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
@ -147,8 +147,8 @@ IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return Status;
}
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNamesCd(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
@ -409,8 +409,8 @@ Cleanup:
return Status;
}
NTSTATUS
INIT_FUNCTION
NTSTATUS
NTAPI
IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN BOOLEAN SingleDisk,
@ -831,9 +831,9 @@ Cleanup:
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
OUT PANSI_STRING NtBootPath)
{

View file

@ -713,9 +713,9 @@ MiResolveImageReferences(IN PVOID ImageBase,
//
// Used for images already loaded (boot drivers)
//
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry,
PUNICODE_STRING FileName,
PLDR_DATA_TABLE_ENTRY *ModuleObject)
@ -793,9 +793,9 @@ LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry,
*
* Initialize a driver that is already loaded in memory.
*/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
{
PDEVICE_NODE DeviceNode;
@ -924,9 +924,9 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
* Return Value
* None
*/
INIT_FUNCTION
VOID
FASTCALL
INIT_FUNCTION
IopInitializeBootDrivers(VOID)
{
PLIST_ENTRY ListHead, NextEntry, NextEntry2;
@ -1120,9 +1120,9 @@ IopInitializeBootDrivers(VOID)
InitializeListHead(&KeLoaderBlock->LoadOrderListHead);
}
INIT_FUNCTION
VOID
FASTCALL
INIT_FUNCTION
IopInitializeSystemDrivers(VOID)
{
PUNICODE_STRING *DriverList, *SavedList;

View file

@ -22,9 +22,9 @@
/* FUNCTIONS ******************************************************************/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PMEMORY_ALLOCATION_DESCRIPTOR MemoryDescriptor;

View file

@ -1187,9 +1187,9 @@ RawUnload(IN PDRIVER_OBJECT DriverObject)
#endif
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
RawFsDriverEntry(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{

View file

@ -42,9 +42,9 @@ IopInitializeArbiters(VOID)
return STATUS_SUCCESS;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
PiInitCacheGroupInformation(VOID)
{
HANDLE KeyHandle;
@ -374,9 +374,9 @@ Exit:
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
IopInitializePlugPlayServices(VOID)
{
NTSTATUS Status;

View file

@ -3095,7 +3095,9 @@ IopInitializePnpServices(IN PDEVICE_NODE DeviceNode)
return IopTraverseDeviceTree(&Context);
}
static NTSTATUS INIT_FUNCTION
static
INIT_FUNCTION
NTSTATUS
IopEnumerateDetectedDevices(
IN HANDLE hBaseKey,
IN PUNICODE_STRING RelativePath OPTIONAL,
@ -3526,7 +3528,9 @@ cleanup:
return Status;
}
static BOOLEAN INIT_FUNCTION
static
INIT_FUNCTION
BOOLEAN
IopIsFirmwareMapperDisabled(VOID)
{
UNICODE_STRING KeyPathU = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CURRENTCONTROLSET\\Control\\Pnp");
@ -3594,9 +3598,9 @@ IopIsFirmwareMapperDisabled(VOID)
return (KeyValue != 0) ? TRUE : FALSE;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
IopUpdateRootKey(VOID)
{
UNICODE_STRING EnumU = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Enum");

View file

@ -40,6 +40,7 @@ void KiSystemCallEntry32();
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
KiInitMachineDependent(VOID)
@ -364,6 +365,7 @@ KiInitModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
}
INIT_FUNCTION
VOID
NTAPI
KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)

View file

@ -17,9 +17,9 @@
/*
* @implemented
*/
INIT_FUNCTION
PCONFIGURATION_COMPONENT_DATA
NTAPI
INIT_FUNCTION
KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child,
IN CONFIGURATION_CLASS Class,
IN CONFIGURATION_TYPE Type,
@ -38,9 +38,9 @@ KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child,
/*
* @implemented
*/
INIT_FUNCTION
PCONFIGURATION_COMPONENT_DATA
NTAPI
INIT_FUNCTION
KeFindConfigurationNextEntry(IN PCONFIGURATION_COMPONENT_DATA Child,
IN CONFIGURATION_CLASS Class,
IN CONFIGURATION_TYPE Type,

View file

@ -85,9 +85,9 @@ setCx86(UCHAR reg, UCHAR data)
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiSetProcessorType(VOID)
{
ULONG EFlags, NewEFlags;
@ -152,9 +152,9 @@ KiSetProcessorType(VOID)
__writeeflags(EFlags);
}
INIT_FUNCTION
ULONG
NTAPI
INIT_FUNCTION
KiGetCpuVendor(VOID)
{
PKPRCB Prcb = KeGetCurrentPrcb();
@ -208,9 +208,9 @@ KiGetCpuVendor(VOID)
return CPU_UNKNOWN;
}
INIT_FUNCTION
ULONG
NTAPI
INIT_FUNCTION
KiGetFeatureBits(VOID)
{
PKPRCB Prcb = KeGetCurrentPrcb();
@ -454,9 +454,9 @@ KiGetFeatureBits(VOID)
return FeatureBits;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiGetCacheInformation(VOID)
{
PKIPCR Pcr = (PKIPCR)KeGetPcr();
@ -722,9 +722,9 @@ KiGetCacheInformation(VOID)
Pcr->SecondLevelCacheAssociativity);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiSetCR0Bits(VOID)
{
ULONG Cr0;
@ -739,9 +739,9 @@ KiSetCR0Bits(VOID)
__writecr0(Cr0);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeTSS2(IN PKTSS Tss,
IN PKGDTENTRY TssEntry OPTIONAL)
{
@ -793,9 +793,9 @@ KiInitializeTSS(IN PKTSS Tss)
Tss->Ss0 = KGDT_R0_DATA;
}
INIT_FUNCTION
VOID
FASTCALL
INIT_FUNCTION
Ki386InitializeTss(IN PKTSS Tss,
IN PKIDTENTRY Idt,
IN PKGDTENTRY Gdt)
@ -982,18 +982,18 @@ KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState)
ProcessorState->SpecialRegisters.Ldtr = Ke386GetLocalDescriptorTable();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeMachineType(VOID)
{
/* Set the Machine Type we got from NTLDR */
KeI386MachineType = KeLoaderBlock->u.I386.MachineType & 0x000FF;
}
INIT_FUNCTION
ULONG_PTR
NTAPI
INIT_FUNCTION
KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context)
{
/* Set CS and ESP */
@ -1005,9 +1005,9 @@ KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context)
return 0;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiRestoreFastSyscallReturnState(VOID)
{
/* Check if the CPU Supports fast system call */
@ -1039,9 +1039,9 @@ KiRestoreFastSyscallReturnState(VOID)
}
}
INIT_FUNCTION
ULONG_PTR
NTAPI
INIT_FUNCTION
Ki386EnableDE(IN ULONG_PTR Context)
{
/* Enable DE */
@ -1049,9 +1049,9 @@ Ki386EnableDE(IN ULONG_PTR Context)
return 0;
}
INIT_FUNCTION
ULONG_PTR
NTAPI
INIT_FUNCTION
Ki386EnableFxsr(IN ULONG_PTR Context)
{
/* Enable FXSR */
@ -1059,9 +1059,9 @@ Ki386EnableFxsr(IN ULONG_PTR Context)
return 0;
}
INIT_FUNCTION
ULONG_PTR
NTAPI
INIT_FUNCTION
Ki386EnableXMMIExceptions(IN ULONG_PTR Context)
{
PKIDTENTRY IdtEntry;
@ -1082,9 +1082,9 @@ Ki386EnableXMMIExceptions(IN ULONG_PTR Context)
return 0;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiI386PentiumLockErrataFixup(VOID)
{
KDESCRIPTOR IdtDescriptor = {0, 0, 0};
@ -1158,9 +1158,9 @@ KiSaveProcessorState(IN PKTRAP_FRAME TrapFrame,
KiSaveProcessorControlState(&Prcb->ProcessorState);
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
KiIsNpxPresent(VOID)
{
ULONG Cr0;
@ -1199,9 +1199,9 @@ KiIsNpxPresent(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
KiIsNpxErrataPresent(VOID)
{
static double Value1 = 4195835.0, Value2 = 3145727.0;

View file

@ -31,7 +31,7 @@ ULONGLONG BootCycles, BootCyclesEnd;
/* FUNCTIONS *****************************************************************/
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
KiInitMachineDependent(VOID)
@ -330,7 +330,7 @@ KiInitMachineDependent(VOID)
KiSetCR0Bits();
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
KiInitializePcr(IN ULONG ProcessorNumber,
@ -392,7 +392,7 @@ KiInitializePcr(IN ULONG ProcessorNumber,
Pcr->PrcbData.MultiThreadProcessorSet = Pcr->PrcbData.SetMember;
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
KiInitializeKernel(IN PKPROCESS InitProcess,
@ -617,7 +617,7 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
LoaderBlock->Prcb = 0;
}
INIT_SECTION
INIT_FUNCTION
VOID
FASTCALL
KiGetMachineBootPointers(IN PKGDTENTRY *Gdt,
@ -658,7 +658,7 @@ KiGetMachineBootPointers(IN PKGDTENTRY *Gdt,
TssSelector.HighWord.Bytes.BaseHi << 24);
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
KiSystemStartupBootStack(VOID)
@ -710,7 +710,7 @@ KiMarkPageAsReadOnly(
__invlpg(Address);
}
INIT_SECTION
INIT_FUNCTION
VOID
NTAPI
KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)

View file

@ -16,18 +16,18 @@
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializeMTRR(IN BOOLEAN FinalCpu)
{
/* FIXME: Support this */
DPRINT("MTRR support detected but not yet taken advantage of\n");
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiAmdK6InitializeMTRR(VOID)
{
/* FIXME: Support this */

View file

@ -17,7 +17,7 @@
/* FUNCTIONS *****************************************************************/
INIT_SECTION
INIT_FUNCTION
ULONG_PTR
NTAPI
Ki386EnableGlobalPage(IN ULONG_PTR Context)
@ -55,18 +55,18 @@ Ki386EnableGlobalPage(IN ULONG_PTR Context)
return 0;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitializePAT(VOID)
{
/* FIXME: Support this */
DPRINT("PAT support detected but not yet taken advantage of\n");
}
INIT_FUNCTION
ULONG_PTR
NTAPI
INIT_FUNCTION
Ki386EnableTargetLargePage(IN ULONG_PTR Context)
{
PLARGE_IDENTITY_MAP IdentityMap = (PLARGE_IDENTITY_MAP)Context;

View file

@ -65,9 +65,9 @@ KSPIN_LOCK KiReverseStallIpiLock;
/* FUNCTIONS *****************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitSystem(VOID)
{
ULONG i;
@ -117,9 +117,9 @@ KiInitSystem(VOID)
sizeof(KeServiceDescriptorTable));
}
INIT_FUNCTION
LARGE_INTEGER
NTAPI
INIT_FUNCTION
KiComputeReciprocal(IN LONG Divisor,
OUT PUCHAR Shift)
{
@ -181,9 +181,9 @@ KiComputeReciprocal(IN LONG Divisor,
return Reciprocal;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KiInitSpinLocks(IN PKPRCB Prcb,
IN CCHAR Number)
{
@ -287,9 +287,9 @@ KiInitSpinLocks(IN PKPRCB Prcb,
}
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
KeInitSystem(VOID)
{
/* Check if Threaded DPCs are enabled */

View file

@ -31,9 +31,9 @@ static GENERIC_MAPPING LpcpPortMapping =
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
LpcInitSystem(VOID)
{
OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;

View file

@ -628,9 +628,9 @@ MiDumpPoolConsumers(BOOLEAN CalledFromDbg, ULONG Tag, ULONG Mask, ULONG Flags)
/* PRIVATE FUNCTIONS **********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_SECTION
ExpSeedHotTags(VOID)
{
ULONG i, Key, Hash, Index;
@ -958,9 +958,9 @@ ExpInsertPoolTracker(IN ULONG Key,
DPRINT1("Out of pool tag space, ignoring...\n");
}
INIT_FUNCTION
VOID
NTAPI
INIT_SECTION
ExInitializePoolDescriptor(IN PPOOL_DESCRIPTOR PoolDescriptor,
IN POOL_TYPE PoolType,
IN ULONG PoolIndex,
@ -1009,9 +1009,9 @@ ExInitializePoolDescriptor(IN PPOOL_DESCRIPTOR PoolDescriptor,
ASSERT(PoolType != PagedPoolSession);
}
INIT_FUNCTION
VOID
NTAPI
INIT_SECTION
InitializePool(IN POOL_TYPE PoolType,
IN ULONG Threshold)
{

View file

@ -39,9 +39,9 @@ MMPTE MmDecommittedPte = {{MM_DECOMMIT << MM_PTE_SOFTWARE_PROTECTION_BITS}};
/* PRIVATE FUNCTIONS **********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeSessionSpaceLayout(VOID)
{
//
@ -120,9 +120,9 @@ MiInitializeSessionSpaceLayout(VOID)
MM_ALLOCATION_GRANULARITY);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiComputeNonPagedPoolVa(IN ULONG FreePages)
{
IN PFN_NUMBER PoolPages;
@ -236,9 +236,9 @@ MiComputeNonPagedPoolVa(IN ULONG FreePages)
}
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PFN_NUMBER PageFrameIndex;

View file

@ -28,9 +28,9 @@ BOOLEAN MiLargePageAllDrivers;
/* FUNCTIONS ******************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeLargePageSupport(VOID)
{
#if _MI_PAGING_LEVELS > 2
@ -48,9 +48,9 @@ MiInitializeLargePageSupport(VOID)
#endif
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiSyncCachedRanges(VOID)
{
ULONG i;
@ -62,9 +62,9 @@ MiSyncCachedRanges(VOID)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeDriverLargePageList(VOID)
{
PWCHAR p, pp;

View file

@ -1667,6 +1667,7 @@ MiQueryPageTableReferences(IN PVOID Address)
return *RefCount;
}
INIT_FUNCTION
BOOLEAN
NTAPI
MmArmInitSystem(
@ -1674,34 +1675,40 @@ MmArmInitSystem(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeSessionSpaceLayout(VOID);
INIT_FUNCTION
NTSTATUS
NTAPI
MiInitMachineDependent(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
VOID
NTAPI
MiComputeColorInformation(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiMapPfnDatabase(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeColorTables(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiInitializePfnDatabase(
@ -1720,18 +1727,21 @@ MiInitializeSessionIds(
VOID
);
INIT_FUNCTION
BOOLEAN
NTAPI
MiInitializeMemoryEvents(
VOID
);
INIT_FUNCTION
PFN_NUMBER
NTAPI
MxGetNextPage(
IN PFN_NUMBER PageCount
);
INIT_FUNCTION
PPHYSICAL_MEMORY_DESCRIPTOR
NTAPI
MmInitializeMemoryLimits(
@ -1778,24 +1788,28 @@ MiCheckPdeForPagedPool(
IN PVOID Address
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeNonPagedPool(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeNonPagedPoolThresholds(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiInitializePoolEvents(
VOID
);
INIT_FUNCTION
VOID //
NTAPI //
InitializePool( //
@ -1804,9 +1818,9 @@ InitializePool( //
); //
// FIXFIX: THIS ONE TOO
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
ExInitializePoolDescriptor(
IN PPOOL_DESCRIPTOR PoolDescriptor,
IN POOL_TYPE PoolType,
@ -1821,6 +1835,7 @@ MiInitializeSessionPool(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeSystemPtes(
@ -1982,18 +1997,21 @@ MiLookupDataTableEntry(
IN PVOID Address
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeDriverLargePageList(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiInitializeLargePageSupport(
VOID
);
INIT_FUNCTION
VOID
NTAPI
MiSyncCachedRanges(

View file

@ -477,9 +477,9 @@ MiScanMemoryDescriptors(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
MxOldFreeDescriptor = *MxFreeDescriptor;
}
INIT_FUNCTION
PFN_NUMBER
NTAPI
INIT_FUNCTION
MxGetNextPage(IN PFN_NUMBER PageCount)
{
PFN_NUMBER Pfn;
@ -502,9 +502,9 @@ MxGetNextPage(IN PFN_NUMBER PageCount)
return Pfn;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiComputeColorInformation(VOID)
{
ULONG L2Associativity;
@ -556,9 +556,9 @@ MiComputeColorInformation(VOID)
KeGetCurrentPrcb()->SecondaryColorMask = MmSecondaryColorMask;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeColorTables(VOID)
{
ULONG i;
@ -607,9 +607,9 @@ MiInitializeColorTables(VOID)
}
#ifndef _M_AMD64
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
MiIsRegularMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN PFN_NUMBER Pfn)
{
@ -666,9 +666,9 @@ MiIsRegularMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
return FALSE;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PFN_NUMBER FreePage, FreePageCount, PagesLeft, BasePage, PageCount;
@ -762,9 +762,9 @@ MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
MxFreeDescriptor->PageCount = FreePageCount;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPfnDatabaseFromPages(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PMMPDE PointerPde;
@ -871,9 +871,9 @@ MiBuildPfnDatabaseFromPages(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPfnDatabaseZeroPage(VOID)
{
PMMPFN Pfn1;
@ -894,9 +894,9 @@ MiBuildPfnDatabaseZeroPage(VOID)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY NextEntry;
@ -1038,9 +1038,9 @@ MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPfnDatabaseSelf(VOID)
{
PMMPTE PointerPte, LastPte;
@ -1068,9 +1068,9 @@ MiBuildPfnDatabaseSelf(VOID)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
/* Scan memory and start setting up PFN entries */
@ -1087,9 +1087,9 @@ MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
#endif /* !_M_AMD64 */
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY NextMd;
@ -1197,9 +1197,9 @@ MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
ExFreePoolWithTag(Buffer, 'lMmM');
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiAdjustWorkingSetManagerParameters(IN BOOLEAN Client)
{
/* This function needs to do more work, for now, we tune page minimums */
@ -1212,9 +1212,9 @@ MiAdjustWorkingSetManagerParameters(IN BOOLEAN Client)
}
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiNotifyMemoryEvents(VOID)
{
/* Are we in a low-memory situation? */
@ -1238,9 +1238,9 @@ MiNotifyMemoryEvents(VOID)
}
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MiCreateMemoryEvent(IN PUNICODE_STRING Name,
OUT PKEVENT *Event)
{
@ -1333,9 +1333,9 @@ CleanUp:
return Status;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
MiInitializeMemoryEvents(VOID)
{
UNICODE_STRING LowString = RTL_CONSTANT_STRING(L"\\KernelObjects\\LowMemoryCondition");
@ -1412,9 +1412,9 @@ MiInitializeMemoryEvents(VOID)
return TRUE;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiAddHalIoMappings(VOID)
{
PVOID BaseAddress;
@ -1616,9 +1616,9 @@ MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly)
KeLowerIrql(OldIrql);
}
INIT_FUNCTION
PPHYSICAL_MEMORY_DESCRIPTOR
NTAPI
INIT_FUNCTION
MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN PBOOLEAN IncludeType)
{
@ -1745,9 +1745,9 @@ MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
return Buffer;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiBuildPagedPool(VOID)
{
PMMPTE PointerPte;
@ -1985,9 +1985,9 @@ MiBuildPagedPool(VOID)
MiInitializeSystemSpaceMap(NULL);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiDbgDumpMemoryDescriptors(VOID)
{
PLIST_ENTRY NextEntry;
@ -2037,9 +2037,9 @@ MiDbgDumpMemoryDescriptors(VOID)
DPRINT1("Total: %08lX (%lu MB)\n", (ULONG)TotalPages, (ULONG)(TotalPages * PAGE_SIZE) / 1024 / 1024);
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
MmArmInitSystem(IN ULONG Phase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{

View file

@ -178,9 +178,9 @@ MiProtectedPoolRemoveEntryList(IN PLIST_ENTRY Entry)
if (PoolBlink) MiProtectFreeNonPagedPool(PoolBlink, 1);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeNonPagedPoolThresholds(VOID)
{
PFN_NUMBER Size = MmMaximumNonPagedPoolInPages;
@ -195,9 +195,9 @@ MiInitializeNonPagedPoolThresholds(VOID)
ASSERT(MiLowNonPagedPoolThreshold < MiHighNonPagedPoolThreshold);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializePoolEvents(VOID)
{
KIRQL OldIrql;
@ -270,9 +270,9 @@ MiInitializePoolEvents(VOID)
KeReleaseQueuedSpinLock(LockQueueMmNonPagedPoolLock, OldIrql);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeNonPagedPool(VOID)
{
ULONG i;

View file

@ -1028,9 +1028,9 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process,
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MmInitializeHandBuiltProcess(IN PEPROCESS Process,
IN PULONG_PTR DirectoryTableBase)
{
@ -1053,9 +1053,9 @@ MmInitializeHandBuiltProcess(IN PEPROCESS Process,
return STATUS_SUCCESS;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MmInitializeHandBuiltProcess2(IN PEPROCESS Process)
{
/* Lock the VAD, ARM3-owned ranges away */

View file

@ -586,9 +586,9 @@ MiProcessLoaderEntry(IN PLDR_DATA_TABLE_ENTRY LdrEntry,
KeLeaveCriticalRegion();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiUpdateThunks(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
IN PVOID OldBase,
IN PVOID NewBase,
@ -1444,9 +1444,9 @@ MiFreeInitializationCode(IN PVOID InitStart,
NULL);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiFindInitializationCode(OUT PVOID *StartVa,
OUT PVOID *EndVa)
{
@ -1679,9 +1679,9 @@ MmFreeDriverInitialization(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
MiDeleteSystemPageableVm(StartPte, PageCount, 0, NULL);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLIST_ENTRY NextEntry;
@ -1868,9 +1868,9 @@ MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MiBuildImportsForBootDrivers(VOID)
{
PLIST_ENTRY NextEntry, NextEntry2;
@ -2133,9 +2133,9 @@ MiBuildImportsForBootDrivers(VOID)
return STATUS_SUCCESS;
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiLocateKernelSections(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
{
ULONG_PTR DllBase;
@ -2194,9 +2194,9 @@ MiLocateKernelSections(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
}
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
MiInitializeLoadedModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
PLDR_DATA_TABLE_ENTRY LdrEntry, NewEntry;

View file

@ -393,9 +393,9 @@ MiReleaseSystemPtes(IN PMMPTE StartingPte,
KeReleaseQueuedSpinLock(LockQueueSystemSpaceLock, OldIrql);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiInitializeSystemPtes(IN PMMPTE StartingPte,
IN ULONG NumberOfPtes,
IN MMSYSTEM_PTE_POOL_TYPE PoolType)

View file

@ -39,8 +39,8 @@ extern NTSTATUS MiRosTrimCache(ULONG Target, ULONG Priority, PULONG NrFreed);
// Helper function to create initial memory areas.
// The created area is always read/write.
//
VOID
INIT_FUNCTION
VOID
NTAPI
MiCreateArm3StaticMemoryArea(PVOID BaseAddress, SIZE_T Size, BOOLEAN Executable)
{
@ -61,8 +61,8 @@ MiCreateArm3StaticMemoryArea(PVOID BaseAddress, SIZE_T Size, BOOLEAN Executable)
// TODO: Perhaps it would be prudent to bugcheck here, not only assert?
}
VOID
INIT_FUNCTION
VOID
NTAPI
MiInitSystemMemoryAreas(VOID)
{
@ -117,9 +117,9 @@ MiInitSystemMemoryAreas(VOID)
#endif /* _X86_ */
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
MiDbgDumpAddressSpace(VOID)
{
//
@ -169,9 +169,9 @@ MiDbgDumpAddressSpace(VOID)
"Non Paged Pool Expansion PTE Space");
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
MmInitBsmThread(VOID)
{
NTSTATUS Status;
@ -193,9 +193,9 @@ MmInitBsmThread(VOID)
return Status;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
MmInitSystem(IN ULONG Phase,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{

View file

@ -55,9 +55,9 @@ ULONG ObpInitializationPhase;
/* PRIVATE FUNCTIONS *********************************************************/
static
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ObpCreateKernelObjectsSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
{
PSECURITY_DESCRIPTOR Sd = NULL;

View file

@ -34,9 +34,9 @@ ULONG ObpUnsecureGlobalNamesLength = sizeof(ObpUnsecureGlobalNamesBuffer);
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ObpCreateGlobalDosDevicesSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
{
PSECURITY_DESCRIPTOR Sd = NULL;
@ -127,9 +127,9 @@ done:
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ObpCreateDosDevicesDirectory(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;

View file

@ -55,9 +55,9 @@ ObpSdReleaseLockShared(IN POB_SD_CACHE_LIST CacheEntry)
KeLeaveCriticalRegion();
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ObpInitSdCache(VOID)
{
ULONG i;

View file

@ -289,9 +289,9 @@ PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState, POWER_ACTION PowerAction)
return Status;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
PoInitSystem(IN ULONG BootPhase)
{
PVOID NotificationEntry;
@ -383,9 +383,9 @@ PopIdle0(IN PPROCESSOR_POWER_STATE PowerState)
HalProcessorIdle();
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
PoInitializePrcb(IN PKPRCB Prcb)
{
/* Initialize the Power State */

View file

@ -434,9 +434,9 @@ ApphelpCacheWrite(VOID)
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
ApphelpCacheInitialize(VOID)
{
DPRINT("SHIMS: ApphelpCacheInitialize\n");

View file

@ -105,9 +105,9 @@ PspDeleteJob ( PVOID ObjectBody )
ExDeleteResource(&Job->JobLock);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
PspInitializeJobStructures(VOID)
{
InitializeListHead(&PsJobListHead);

View file

@ -62,9 +62,9 @@ BOOLEAN PspDoingGiveBacks;
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
USHORT
NTAPI
INIT_FUNCTION
NameToOrdinal(IN PCHAR Name,
IN PVOID DllBase,
IN ULONG NumberOfNames,
@ -105,9 +105,9 @@ NameToOrdinal(IN PCHAR Name,
return NameToOrdinal(Name, DllBase, NumberOfNames, NameTable, OrdinalTable);
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
LookupEntryPoint(IN PVOID DllBase,
IN PCHAR Name,
OUT PVOID *EntryPoint)
@ -157,9 +157,9 @@ LookupEntryPoint(IN PVOID DllBase,
return STATUS_SUCCESS;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
PspLookupSystemDllEntryPoint(IN PCHAR Name,
IN PVOID *EntryPoint)
{
@ -167,9 +167,9 @@ PspLookupSystemDllEntryPoint(IN PCHAR Name,
return LookupEntryPoint(PspSystemDllBase, Name, EntryPoint);
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
PspLookupKernelUserEntryPoints(VOID)
{
NTSTATUS Status;
@ -273,9 +273,9 @@ PspMapSystemDll(IN PEPROCESS Process,
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
PsLocateSystemDll(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@ -359,9 +359,9 @@ PsLocateSystemDll(VOID)
return Status;
}
INIT_FUNCTION
NTSTATUS
NTAPI
INIT_FUNCTION
PspInitializeSystemDll(VOID)
{
NTSTATUS Status;
@ -392,9 +392,9 @@ PspInitializeSystemDll(VOID)
return Status;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
PspInitPhase1(VOID)
{
/* Initialize the System DLL and return status of operation */
@ -402,9 +402,9 @@ PspInitPhase1(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
PspInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
NTSTATUS Status;
@ -620,9 +620,9 @@ PspInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
PsInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
/* Check the initialization phase */

View file

@ -95,9 +95,9 @@ PspReturnProcessQuotaSpecifiedPool(IN PEPROCESS Process,
/* FUNCTIONS ***************************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
PsInitializeQuotaSystem(VOID)
{
RtlZeroMemory(&PspDefaultQuotaBlock, sizeof(PspDefaultQuotaBlock));

View file

@ -24,8 +24,9 @@ extern ERESOURCE SepSubjectContextLock;
/* PRIVATE FUNCTIONS **********************************************************/
static BOOLEAN
static
INIT_FUNCTION
BOOLEAN
SepInitExports(VOID)
{
SepExports.SeCreateTokenPrivilege = SeCreateTokenPrivilege;
@ -89,9 +90,9 @@ SepInitExports(VOID)
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
SepInitializationPhase0(VOID)
{
PAGED_CODE();
@ -124,9 +125,9 @@ SepInitializationPhase0(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
SepInitializationPhase1(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@ -232,9 +233,9 @@ SepInitializationPhase1(VOID)
return TRUE;
}
INIT_FUNCTION
BOOLEAN
NTAPI
INIT_FUNCTION
SeInitSystem(VOID)
{
/* Check the initialization phase */

View file

@ -17,9 +17,9 @@
/* PRIVATE FUNCTIONS *********************************************************/
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
Ki386VdmEnablePentiumExtentions(IN BOOLEAN Enable)
{
ULONG EFlags, Cr4;
@ -36,9 +36,9 @@ Ki386VdmEnablePentiumExtentions(IN BOOLEAN Enable)
__writeeflags(EFlags);
}
INIT_FUNCTION
VOID
NTAPI
INIT_FUNCTION
KeI386VdmInitialize(VOID)
{
NTSTATUS Status;

Some files were not shown because too many files have changed in this diff Show more