PoGetIdleTimes

VOID __stdcall PoGetIdleTimes(
        PROCESSOR_NUMBER *ProcessorNumber,
        _SYSTEM_PROCESSOR_IDLE_INFORMATION *IdleInfo,
        _SYSTEM_PROCESSOR_TICK_INFORMATION *TickInfo){
  unsigned int ProcessorIndexFromNumber; 
  _KPRCB *Prcb; 
  _ETHREAD *CurrentThread; 
  _KPRCB *v9; 
  unsigned __int8 CurrentIrql; 
  unsigned int v11; 
  _KAFFINITY_EX Affinity; 

  memset(&Affinity, 0i64, sizeof(Affinity));
  ProcessorIndexFromNumber = KeGetProcessorIndexFromNumber(&ProcessorNumber->Group);
  Prcb = KeGetPrcb(ProcessorIndexFromNumber);
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  v9 = Prcb;
  --CurrentThread->Tcb.KernelApcDisable;
  ExAcquirePushLockSharedEx((_EX_PUSH_LOCK *)&stru_140C23628 + 123, 0i64);
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(2ui64);
  LODWORD(v9) = PopGetIdleTimesCallback(v9, (UINT64)IdleInfo, (UINT64)TickInfo);
  __writecr8(CurrentIrql);
  if( (int)v9 < 0 )
  {
    *(_DWORD *)&Affinity.Count = 1310721;
    memset(&Affinity.Reserved, 0i64, 0xA4u);
    v11 = KeGetProcessorIndexFromNumber(&ProcessorNumber->Group);
    KeAddProcessorAffinityEx(&Affinity.Count, v11);
    PopExecuteOnTargetProcessors(
      &Affinity,
      (INT64 *)PopGetIdleTimesCallback,
      (_KPRCB *)IdleInfo,
      (UINT64)TickInfo,
      *(UINT64 *)&Affinity.Count,
      Affinity.Bitmap[0],
      Affinity.Bitmap[1]);
  }
  PopReleaseRwLock((_POP_RW_LOCK *)((char *)&stru_140C23628 + 984));
}

Referenced by:

ExpQueryProcessorInformationCounters
ExpQuerySystemInformation