[NDK] Fix the type of KPROCESS::ActiveProcessors

Also fix related logic in KiSwapProcess
This commit is contained in:
Timo Kreuzer 2018-02-10 20:30:14 +01:00
parent 158812409d
commit de1b195837
2 changed files with 4 additions and 6 deletions

View 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 */

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