diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 6a26eb58fb4..3dc1aa54151 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -21,9 +21,7 @@ #include "cm.h" #if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, CmInitHives) -#pragma alloc_text(INIT, CmInitializeRegistry) -#pragma alloc_text(INIT, CmInit2) +#pragma alloc_text(INIT, CmInitSystem1) #endif /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/ex/event.c b/reactos/ntoskrnl/ex/event.c index 9c423ea493d..2360927558e 100644 --- a/reactos/ntoskrnl/ex/event.c +++ b/reactos/ntoskrnl/ex/event.c @@ -19,7 +19,7 @@ /* GLOBALS *******************************************************************/ -POBJECT_TYPE ExEventObjectType = NULL; +POBJECT_TYPE _ExEventObjectType = NULL; GENERIC_MAPPING ExpEventMapping = { diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index 33efdf98915..ff496cd9b44 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -14,12 +14,12 @@ #include #if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation() +#pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation) #endif /* GLOBALS ******************************************************************/ -POBJECT_TYPE ExSemaphoreObjectType; +POBJECT_TYPE _ExSemaphoreObjectType; GENERIC_MAPPING ExSemaphoreMapping = { diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index 37d6964a303..c0e17281e93 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -15,10 +15,6 @@ #define TICKSPERMINUTE 600000000 -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitTimeZoneInfo) -#endif - /* GLOBALS ******************************************************************/ /* Note: Bias[minutes] = UTC - local time */ diff --git a/reactos/ntoskrnl/fs/filelock.c b/reactos/ntoskrnl/fs/filelock.c index 029337788d3..30ea8a9fe87 100644 --- a/reactos/ntoskrnl/fs/filelock.c +++ b/reactos/ntoskrnl/fs/filelock.c @@ -12,11 +12,6 @@ #define NDEBUG #include -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, FsRtlpInitFileLockingImplementation) -#endif - - /* NOTE: I'm not using resource syncronization here, since FsRtlFastCheckLockForRead/Write diff --git a/reactos/ntoskrnl/fs/mcb.c b/reactos/ntoskrnl/fs/mcb.c index 5f60d7cabbe..ce8fdbf90c1 100644 --- a/reactos/ntoskrnl/fs/mcb.c +++ b/reactos/ntoskrnl/fs/mcb.c @@ -312,9 +312,9 @@ FsRtlRemoveMcbEntry(IN PMCB Mcb, IN ULONG SectorCount) { /* Call the large function */ - return FsRtlRemoveLargeMcbEntry(&Mcb->DummyFieldThatSizesThisStructureCorrectly, - (LONGLONG)Vbn, - (LONGLONG)SectorCount); + FsRtlRemoveLargeMcbEntry(&Mcb->DummyFieldThatSizesThisStructureCorrectly, + (LONGLONG)Vbn, + (LONGLONG)SectorCount); } diff --git a/reactos/ntoskrnl/include/internal/ex.h b/reactos/ntoskrnl/include/internal/ex.h index 72ec44cc8ac..15f82953381 100644 --- a/reactos/ntoskrnl/include/internal/ex.h +++ b/reactos/ntoskrnl/include/internal/ex.h @@ -9,6 +9,7 @@ extern ULONG ExpTimeZoneId; extern ULONG ExpTickCountMultiplier; extern ULONG ExpLastTimeZoneBias; extern POBJECT_TYPE ExEventPairObjectType; +extern POBJECT_TYPE _ExEventObjectType, _ExSemaphoreObjectType; extern ULONG NtBuildNumber; extern ULONG NtMajorVersion; extern ULONG NtMinorVersion; diff --git a/reactos/ntoskrnl/include/ntoskrnl.h b/reactos/ntoskrnl/include/ntoskrnl.h index db7a7316cf6..8f2b3618ba4 100644 --- a/reactos/ntoskrnl/include/ntoskrnl.h +++ b/reactos/ntoskrnl/include/ntoskrnl.h @@ -62,6 +62,8 @@ // #define IoFileObjectType _IoFileObjectType #define PsThreadType _PsThreadType +#define ExEventObjectType _ExEventObjectType +#define ExSemaphoreObjectType _ExSemaphoreObjectType #define KdDebuggerEnabled _KdDebuggerEnabled #define KdDebuggerNotPresent _KdDebuggerNotPresent #define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray diff --git a/reactos/ntoskrnl/io/iomgr/bootlog.c b/reactos/ntoskrnl/io/iomgr/bootlog.c index 010d61ce7ff..d7455194224 100644 --- a/reactos/ntoskrnl/io/iomgr/bootlog.c +++ b/reactos/ntoskrnl/io/iomgr/bootlog.c @@ -16,7 +16,7 @@ #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, IopInitBootLog) -#pragma alloc_text(INIT, IopStartBootLog() +#pragma alloc_text(INIT, IopStartBootLog) #endif /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/reactos/ntoskrnl/io/iomgr/iomgr.c index 2445484f849..648114376ce 100644 --- a/reactos/ntoskrnl/io/iomgr/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr/iomgr.c @@ -59,7 +59,7 @@ VOID INIT_FUNCTION IopInitLookasideLists(VOID); #pragma alloc_text(INIT, IoInitCancelHandling) #pragma alloc_text(INIT, IoInitShutdownNotification) #pragma alloc_text(INIT, IopInitLookasideLists) -#pragma alloc_text(INIT, IoInit) +#pragma alloc_text(INIT, IoInitSystem) #endif /* INIT FUNCTIONS ************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index d0ebda6e8c9..b4692aac8d4 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -28,9 +28,6 @@ PIO_BUS_TYPE_GUID_LIST IopBusTypeGuidList = NULL; #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, PnpInit) #pragma alloc_text(INIT, PnpInit2) -#pragma alloc_text(INIT, IopUpdateRootKey) -#pragma alloc_text(INIT, IopEnumerateDetectedDevices) -#pragma alloc_text(INIT, IopIsAcpiComputer) #endif typedef struct _INVALIDATE_DEVICE_RELATION_DATA @@ -41,7 +38,7 @@ typedef struct _INVALIDATE_DEVICE_RELATION_DATA NTSTATUS Status; } INVALIDATE_DEVICE_RELATION_DATA, *PINVALIDATE_DEVICE_RELATION_DATA; -static VOID CALLBACK +static VOID NTAPI IopInvalidateDeviceRelations( IN PDEVICE_OBJECT DeviceObject, IN PVOID InvalidateContext); @@ -2456,7 +2453,7 @@ IopInitializePnpServices(IN PDEVICE_NODE DeviceNode, * The call can be make synchronous by defining the Event field * of the INVALIDATE_DEVICE_RELATION_DATA structure */ -static VOID CALLBACK +static VOID NTAPI IopInvalidateDeviceRelations( IN PDEVICE_OBJECT DeviceObject, IN PVOID InvalidateContext) /* PINVALIDATE_DEVICE_RELATION_DATA */ @@ -2476,7 +2473,7 @@ IopInvalidateDeviceRelations( NTSTATUS Status; ULONG i; - DPRINT("DeviceObject 0x%p, Type %d\n", DeviceObject, Type); + DPRINT("DeviceObject 0x%p\n", DeviceObject); DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); diff --git a/reactos/ntoskrnl/ke/bug.c b/reactos/ntoskrnl/ke/bug.c index f0faf009e1e..edcf8fb6a86 100644 --- a/reactos/ntoskrnl/ke/bug.c +++ b/reactos/ntoskrnl/ke/bug.c @@ -851,7 +851,7 @@ KeBugCheckWithTf(IN ULONG BugCheckCode, } /* Raise IRQL to HIGH_LEVEL */ - Ke386DisableInterrupts(); + _disable(); KeRaiseIrql(HIGH_LEVEL, &OldIrql); /* Unlock the Kernel Adress Space if we own it */ diff --git a/reactos/ntoskrnl/mm/i386/pfault.c b/reactos/ntoskrnl/mm/i386/pfault.c index 96adea4e5a0..e2626046c31 100644 --- a/reactos/ntoskrnl/mm/i386/pfault.c +++ b/reactos/ntoskrnl/mm/i386/pfault.c @@ -43,7 +43,7 @@ ULONG KiPageFaultHandler(PKTRAP_FRAME Tf, ULONG ExceptionNr) /* it's safe to enable interrupts after cr2 has been saved */ if (Tf->EFlags & (X86_EFLAGS_VM|X86_EFLAGS_IF)) { - Ke386EnableInterrupts(); + _enable(); } if (cr2 >= (ULONG_PTR)MmSystemRangeStart) diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index d54cade931a..b12bb875874 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -19,6 +19,7 @@ /* * Compiler defined symbols */ +extern unsigned int _image_base__; extern unsigned int _text_start__; extern unsigned int _text_end__; @@ -158,7 +159,6 @@ MmInitVirtualMemory(ULONG_PTR LastKernelAddress, 0, BoundaryAddressMultiple); - extern unsigned int _image_base__; BaseAddress = (PVOID)&_image_base__; Length = PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)) - (ULONG_PTR)&_image_base__; ParamLength = ParamLength - Length; diff --git a/reactos/ntoskrnl/ntoskrnl.def b/reactos/ntoskrnl/ntoskrnl.def index 59e18b11cff..e7f7b6922a2 100644 --- a/reactos/ntoskrnl/ntoskrnl.def +++ b/reactos/ntoskrnl/ntoskrnl.def @@ -99,11 +99,11 @@ ExCreateCallback@16 ExDeleteNPagedLookasideList@4 ExDeletePagedLookasideList@4 ExDeleteResourceLite@4 -ExDesktopObjectType DATA +ExDesktopObjectType ExDisableResourceBoostLite@4 ExEnumHandleTable@16 @ExEnterCriticalRegionAndAcquireFastMutexUnsafe@4 -ExEventObjectType DATA +ExEventObjectType=_ExEventObjectType ExExtendZone@12 ExFreePool@4 ExFreePoolWithTag@8 @@ -152,7 +152,7 @@ ExReinitializeResourceLite@4 @ExReleaseFastMutexUnsafeAndLeaveCriticalRegion@4 ExReleaseResourceForThreadLite@8 @ExReleaseResourceLite@4 -ExSemaphoreObjectType DATA +ExSemaphoreObjectType=_ExSemaphoreObjectType ExSetResourceOwnerPointer@8 ExSetTimerResolution@8 ExSystemExceptionFilter@0 diff --git a/reactos/ntoskrnl/ps/job.c b/reactos/ntoskrnl/ps/job.c index 791f16a252a..66956d462cb 100644 --- a/reactos/ntoskrnl/ps/job.c +++ b/reactos/ntoskrnl/ps/job.c @@ -14,9 +14,6 @@ #define NDEBUG #include -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, PsInitJobManagment) -#endif /* GLOBALS *******************************************************************/