Author: sginsberg
Date: Tue Sep 29 18:34:33 2015
New Revision: 69416
URL:
http://svn.reactos.org/svn/reactos?rev=69416&view=rev
Log:
Remove legacy _KeNumberProcessors hack. While we are at it fix its type (CCHAR not UCHAR)
and remove it from the NDK as it is a public global provided by the DDK (where we properly
define it with the "__CREATE_NTOS_DATA_IMPORT_ALIAS" fix when needed. Also, the
variable KeActiveProcessors is not even exported from NTOS so move it to an internal
header. Fix missed fix in UDFS as well in uncompiled file.
Modified:
trunk/reactos/drivers/filesystems/udfs/dldetect.cpp
trunk/reactos/drivers/network/ndis/ndis/misc.c
trunk/reactos/include/ndk/ketypes.h
trunk/reactos/ntoskrnl/include/internal/ke.h
trunk/reactos/ntoskrnl/include/ntoskrnl.h
trunk/reactos/ntoskrnl/ke/amd64/kiinit.c
trunk/reactos/ntoskrnl/ke/krnlinit.c
trunk/reactos/ntoskrnl/ntoskrnl.spec
Modified: trunk/reactos/drivers/filesystems/udfs/dldetect.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/dldetect.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/dldetect.cpp [iso-8859-1] Tue Sep 29 18:34:33
2015
@@ -50,7 +50,7 @@
/// 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();
}
Modified: trunk/reactos/drivers/network/ndis/ndis/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -324,7 +324,7 @@
NdisSystemProcessorCount(
VOID)
{
- return (CCHAR)KeNumberProcessors;
+ return KeNumberProcessors;
}
Modified: trunk/reactos/include/ndk/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/ketypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/ketypes.h [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -1480,17 +1480,6 @@
//
// 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;
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -78,6 +78,7 @@
IN ULONG Length
);
+extern KAFFINITY KeActiveProcessors;
extern PKNMI_HANDLER_CALLBACK KiNmiCallbackListHead;
extern KSPIN_LOCK KiNmiCallbackListLock;
extern PVOID KeUserApcDispatcher;
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
==============================================================================
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -88,11 +88,6 @@
/* 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
//
Modified: trunk/reactos/ntoskrnl/ke/amd64/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/kiinit.c…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -385,7 +385,7 @@
KeLoaderBlock = LoaderBlock;
/* Get the current CPU number */
- Cpu = (CCHAR)KeNumberProcessors++; // FIXME
+ Cpu = KeNumberProcessors++; // FIXME
/* LoaderBlock initialization for Cpu 0 */
if (Cpu == 0)
Modified: trunk/reactos/ntoskrnl/ke/krnlinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/krnlinit.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/krnlinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/krnlinit.c [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -32,7 +32,7 @@
PKPRCB KiProcessorBlock[MAXIMUM_PROCESSORS];
/* Number of processors */
-UCHAR KeNumberProcessors = 0;
+CCHAR KeNumberProcessors = 0;
/* NUMA Node Support */
KNODE KiNode0;
Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Tue Sep 29 18:34:33 2015
@@ -631,7 +631,7 @@
@ 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)