PoSetThermalPassiveCooling

NTSTATUS __stdcall PoSetThermalPassiveCooling(VOID *ThermalRequest, UINT8 Throttle){
  NTSTATUS v4; 
  _POP_COOLING_EXTENSION *v5; 

  v4 = 0;
  if( !PoGetThermalRequestSupport(ThermalRequest, PoThermalRequestPassive) )
    return -1073741637;
  if( Throttle > 0x64u )
    return -1073741811;
  v5 = (_POP_COOLING_EXTENSION *)*((_QWORD *)ThermalRequest + 4);
  PopAcquireRwLockExclusive(&v5->Lock);
  if( *((_BYTE *)ThermalRequest + 18) )
  {
    if( *((_BYTE *)ThermalRequest + 16) != Throttle )
    {
      PopThermalUpdatePassiveTimeTracking();
      *((_BYTE *)ThermalRequest + 16) = Throttle;
      PopDiagTraceThermalRequestPassiveUpdate((__int64)ThermalRequest);
      PopPropogateCoolingChange(v5);
    }
  }
  else
  {
    v4 = -1073741431;
  }
  PopReleaseRwLock(&v5->Lock);
  return v4;
}

Referenced by:

No references.