KeQuerySchedulingGroupReadyTime
VOID __stdcall KeQuerySchedulingGroupReadyTime(_KSCHEDULING_GROUP *SchedulingGroup){
unsigned __int8 CurrentIrql;
__int64 v2;
_KPRCB **v3;
_KSCB *PerProcessor;
__int64 v5;
_KPRCB *v6;
UINT64 SpinCount;
CurrentIrql = KeGetCurrentIrql();
__writecr8(2ui64);
v2 = 0i64;
if( (_DWORD)KeNumberProcessors_0 )
{
v3 = &KiProcessorBlock;
PerProcessor = SchedulingGroup->PerProcessor;
v5 = (unsigned int)KeNumberProcessors_0;
do
{
LODWORD(SpinCount) = 0;
v6 = *v3;
while( _interlockedbittestandset64((volatile signed __int32 *)v6 + 12, 0i64) )
{
do
KeYieldProcessorEx(&SpinCount);
while( *((_QWORD *)v6 + 6) );
}
v2 += PerProcessor->ReadyTime;
if( (*((_BYTE *)PerProcessor + 112) & 1) != 0 )
v2 += *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart - PerProcessor->InsertTime;
_InterlockedAnd64((volatile signed __int64 *)v6 + 6, 0i64);
++v3;
++PerProcessor;
--v5;
}
while( v5 );
}
__writecr8(CurrentIrql);
}Referenced by:
NtSetInformationJobObject
PspQueryJobHierarchyAccountingInformation