[NDK] Fix the type of KPROCESS::ActiveProcessors
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 10 Feb 2018 19:30:14 +0000 (20:30 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 1 Jul 2018 12:45:21 +0000 (14:45 +0200)
Also fix related logic in KiSwapProcess

ntoskrnl/ke/amd64/stubs.c
sdk/include/ndk/ketypes.h

index f63485e..9f8ed16 100644 (file)
@@ -278,13 +278,11 @@ KiSwapProcess(IN PKPROCESS NewProcess,
               IN PKPROCESS OldProcess)
 {
     PKIPCR Pcr = (PKIPCR)KeGetPcr();
-#ifdef CONFIG_SMP
-    LONG SetMember;
 
+#ifdef CONFIG_SMP
     /* Update active processor mask */
-    SetMember = (LONG)Pcr->SetMember;
-    InterlockedXor((PLONG)&NewProcess->ActiveProcessors, SetMember);
-    InterlockedXor((PLONG)&OldProcess->ActiveProcessors, SetMember);
+    InterlockedXor64((PLONG64)&NewProcess->ActiveProcessors, Pcr->Prcb.SetMember);
+    InterlockedXor64((PLONG64)&OldProcess->ActiveProcessors, Pcr->Prcb.SetMember);
 #endif
 
     /* Update CR3 */
index 839a0d7..7a8c614 100644 (file)
@@ -1988,7 +1988,7 @@ typedef struct _KPROCESS
     UCHAR Iopl;
     UCHAR Unused;
 #endif
-    volatile ULONG ActiveProcessors;
+    volatile KAFFINITY ActiveProcessors;
     ULONG KernelTime;
     ULONG UserTime;
     LIST_ENTRY ReadyListHead;