MiSyncCommitSignals
VOID __stdcall MiSyncCommitSignals(_MI_PARTITION *Partition, UINT64 LockHeld){
int v2;
unsigned __int64 TotalCommittedPages;
_KEVENT *v5;
_KEVENT *v6;
_KEVENT *v7;
_KEVENT *v8;
_KLOCK_QUEUE_HANDLE LockHandle;
v2 = LockHeld;
memset(&LockHandle, 0, sizeof(LockHandle));
if( (_DWORD)LockHeld )
LockHandle.OldIrql = 17;
else
KeAcquireInStackQueuedSpinLock(&Partition->Commit.EventLock, &LockHandle);
TotalCommittedPages = Partition->Vp.TotalCommittedPages;
if( TotalCommittedPages >= Partition->Commit.LowCommitThreshold )
{
v8 = Partition->Core.MemoryEvents[7];
if( TotalCommittedPages < Partition->Commit.HighCommitThreshold )
{
if( *((_DWORD *)v8 + 1) == 1 )
{
KeResetEvent(v8);
KeResetEvent(Partition->Core.MemoryEvents[8]);
}
}
else
{
if( !*((_DWORD *)v8 + 1) )
KeSetEvent(v8, 0, 0);
if( Partition->Vp.TotalCommitLimit == Partition->Commit.TotalCommitLimitMaximum )
KeSetEvent(Partition->Core.MemoryEvents[8], 0, 0);
}
v7 = Partition->Core.MemoryEvents[6];
if( *((_DWORD *)v7 + 1) == 1 )
goto LABEL_8;
}
else
{
v5 = Partition->Core.MemoryEvents[6];
if( !*((_DWORD *)v5 + 1) )
KeSetEvent(v5, 0, 0);
v6 = Partition->Core.MemoryEvents[7];
if( *((_DWORD *)v6 + 1) == 1 )
{
KeResetEvent(v6);
v7 = Partition->Core.MemoryEvents[8];
LABEL_8:
KeResetEvent(v7);
}
}
if( !v2 )
{
KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
__writecr8(LockHandle.OldIrql);
}
}Referenced by:
MiChargeCommit
MiComputeCommitThresholds
MiRemoveLockedPageCharge
MiReplenishLocalCommit
MiReturnCommit
MiUnlockMdlWritePages