mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 09:21:50 +00:00
[NTOS:MM] balance: Fix PageOutThreadActive value check
This commit is contained in:
parent
bba03c886c
commit
a8322459ab
1 changed files with 6 additions and 2 deletions
|
@ -289,7 +289,7 @@ VOID
|
|||
NTAPI
|
||||
MmRebalanceMemoryConsumers(VOID)
|
||||
{
|
||||
// if (InterlockedCompareExchange(&PageOutThreadActive, 0, 1) == 0)
|
||||
if (InterlockedCompareExchange(&PageOutThreadActive, 1, 0) == 0)
|
||||
{
|
||||
KeSetEvent(&MiBalancerEvent, IO_NO_INCREMENT, FALSE);
|
||||
}
|
||||
|
@ -404,7 +404,11 @@ MiBalancerThread(PVOID Unused)
|
|||
while (InitialTarget != 0);
|
||||
|
||||
if (Status == STATUS_WAIT_0)
|
||||
InterlockedDecrement(&PageOutThreadActive);
|
||||
{
|
||||
LONG Active = InterlockedExchange(&PageOutThreadActive, 0);
|
||||
ASSERT(Active == 1);
|
||||
DBG_UNREFERENCED_LOCAL_VARIABLE(Active);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue