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.

svn path=/trunk/; revision=69416
This commit is contained in:
Stefan Ginsberg 2015-09-29 18:34:33 +00:00
parent 1129e7a935
commit 0fbe4b9b8e
8 changed files with 6 additions and 21 deletions

View 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();
}

View File

@ -324,7 +324,7 @@ EXPORT
NdisSystemProcessorCount(
VOID)
{
return (CCHAR)KeNumberProcessors;
return KeNumberProcessors;
}

View 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;

View 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;

View File

@ -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
//

View 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)

View 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;

View File

@ -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)