Remove legacy _KeNumberProcessors hack. While we are at it fix its type (CCHAR not...
authorStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 29 Sep 2015 18:34:33 +0000 (18:34 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 29 Sep 2015 18:34:33 +0000 (18:34 +0000)
svn path=/trunk/; revision=69416

reactos/drivers/filesystems/udfs/dldetect.cpp
reactos/drivers/network/ndis/ndis/misc.c
reactos/include/ndk/ketypes.h
reactos/ntoskrnl/include/internal/ke.h
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/ke/amd64/kiinit.c
reactos/ntoskrnl/ke/krnlinit.c
reactos/ntoskrnl/ntoskrnl.spec

index 0e0d4a0..cdf7663 100644 (file)
@@ -50,7 +50,7 @@ THREAD_REC_BLOCK DLDThreadAcquireChain[DLD_MAX_REC_LEVEL];
 /// Initialize deadlock detector
 VOID DLDInit(ULONG MaxThrdCount /// Maximum supported number of threads
 ) {
-    if (*KeNumberProcessors>1) {
+    if (KeNumberProcessors>1) {
         KdPrint(("Deadlock Detector is designed for uniprocessor machines only!\n"));
         BrutePoint();
     }
index be40c87..19755c5 100644 (file)
@@ -324,7 +324,7 @@ EXPORT
 NdisSystemProcessorCount(
     VOID)
 {
-       return (CCHAR)KeNumberProcessors;
+       return KeNumberProcessors;
 }
 
 
index 25f13fa..11e48bf 100644 (file)
@@ -1480,17 +1480,6 @@ extern struct _LOADER_PARAMETER_BLOCK NTSYSAPI *KeLoaderBlock;
 //
 // Exported Hardware Data
 //
-extern KAFFINITY NTSYSAPI KeActiveProcessors;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-extern volatile CCHAR NTSYSAPI KeNumberProcessors;
-#else
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-extern CCHAR NTSYSAPI KeNumberProcessors;
-#else
-//extern PCCHAR KeNumberProcessors;
-extern NTSYSAPI CCHAR KeNumberProcessors; //FIXME: Note to Alex: I won't fix this atm, since I prefer to discuss this with you first.
-#endif
-#endif
 extern ULONG NTSYSAPI KiDmaIoCoherency;
 extern ULONG NTSYSAPI KeMaximumIncrement;
 extern ULONG NTSYSAPI KeMinimumIncrement;
index 879b5e1..f2c32fb 100644 (file)
@@ -78,6 +78,7 @@ typedef PCHAR
     IN ULONG Length
 );
 
+extern KAFFINITY KeActiveProcessors;
 extern PKNMI_HANDLER_CALLBACK KiNmiCallbackListHead;
 extern KSPIN_LOCK KiNmiCallbackListLock;
 extern PVOID KeUserApcDispatcher;
index 5e5c9b4..404878a 100644 (file)
 /* PNP GUIDs */
 #include <umpnpmgr/sysguid.h>
 
-//
-// Define the internal versions of external and public global data
-//
-#define KeNumberProcessors              _KeNumberProcessors
-extern UCHAR _KeNumberProcessors;
 #define ExRaiseStatus RtlRaiseStatus
 
 //
index 1bd9568..322ad12 100644 (file)
@@ -385,7 +385,7 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
     KeLoaderBlock = LoaderBlock;
 
     /* Get the current CPU number */
-    Cpu = (CCHAR)KeNumberProcessors++; // FIXME
+    Cpu = KeNumberProcessors++; // FIXME
 
     /* LoaderBlock initialization for Cpu 0 */
     if (Cpu == 0)
index 128d90f..96ac3d2 100644 (file)
@@ -32,7 +32,7 @@ PLOADER_PARAMETER_BLOCK KeLoaderBlock;
 PKPRCB KiProcessorBlock[MAXIMUM_PROCESSORS];
 
 /* Number of processors */
-UCHAR KeNumberProcessors = 0;
+CCHAR KeNumberProcessors = 0;
 
 /* NUMA Node Support */
 KNODE KiNode0;
index 6dff11f..da37554 100644 (file)
 @ stdcall KeLeaveGuardedRegion() _KeLeaveGuardedRegion
 @ extern KeLoaderBlock
 @ cdecl -arch=x86_64 -private KeLowerIrql(long)
-@ extern KeNumberProcessors _KeNumberProcessors
+@ extern KeNumberProcessors
 @ stdcall -arch=i386,arm KeProfileInterrupt(ptr)
 @ stdcall KeProfileInterruptWithSource(ptr long)
 @ stdcall KePulseEvent(ptr long long)