https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f92c44b21761ca4f23dac20bde3b9afe40a7210f
commit f92c44b21761ca4f23dac20bde3b9afe40a7210f Author: Timo Kreuzer <timo.kreu...@reactos.org> AuthorDate: Sat Nov 25 14:52:05 2023 +0200 Commit: Timo Kreuzer <timo.kreu...@reactos.org> CommitDate: Thu Nov 30 13:03:52 2023 +0200 [NTOS:KE] Remove KiMask32Array It's useless and also broken in the way it is used. Replace it with a simple shift and make it correct for 64 bit. --- ntoskrnl/include/internal/ke.h | 5 ++--- ntoskrnl/ke/thrdobj.c | 10 ---------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ntoskrnl/include/internal/ke.h b/ntoskrnl/include/internal/ke.h index 10a352a0981..fbd3660553e 100644 --- a/ntoskrnl/include/internal/ke.h +++ b/ntoskrnl/include/internal/ke.h @@ -137,7 +137,6 @@ extern LIST_ENTRY KiProcessInSwapListHead, KiProcessOutSwapListHead; extern LIST_ENTRY KiStackInSwapListHead; extern KEVENT KiSwapEvent; extern PKPRCB KiProcessorBlock[]; -extern ULONG KiMask32Array[MAXIMUM_PRIORITY]; extern ULONG_PTR KiIdleSummary; extern PVOID KeUserApcDispatcher; extern PVOID KeUserCallbackDispatcher; @@ -156,8 +155,8 @@ extern VOID __cdecl KiInterruptTemplate(VOID); /* MACROS *************************************************************************/ -#define AFFINITY_MASK(Id) KiMask32Array[Id] -#define PRIORITY_MASK(Id) KiMask32Array[Id] +#define AFFINITY_MASK(ProcessorIndex) ((KAFFINITY)1 << (ProcessorIndex)) +#define PRIORITY_MASK(Priority) (1UL << (Priority)) /* Tells us if the Timer or Event is a Syncronization or Notification Object */ #define TIMER_OR_EVENT_TYPE 0x7L diff --git a/ntoskrnl/ke/thrdobj.c b/ntoskrnl/ke/thrdobj.c index 627f42c7395..1fc58b99c9e 100644 --- a/ntoskrnl/ke/thrdobj.c +++ b/ntoskrnl/ke/thrdobj.c @@ -15,16 +15,6 @@ extern EX_WORK_QUEUE ExWorkerQueue[MaximumWorkQueue]; extern LIST_ENTRY PspReaperListHead; -ULONG KiMask32Array[MAXIMUM_PRIORITY] = -{ - 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, - 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, - 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, - 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, 0x800000, - 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, 0x20000000, - 0x40000000, 0x80000000 -}; - /* FUNCTIONS *****************************************************************/ UCHAR