PopPepComponentSetResidency
VOID __stdcall PopPepComponentSetResidency(POP_PEP_DEVICE *Device, UINT64 ComponentIndex, UINT64 Residency){
unsigned __int64 v3;
POP_PEP_DEVICE *v5;
POP_PEP_DEVICE ResidencyIdleState;
char v7;
char v8;
unsigned int ready;
unsigned int v10;
INT64 v11;
INT64 v12;
UINT8 v13;
v3 = 0i64;
v5 = &Device[50 * (unsigned int)ComponentIndex + 46];
v13 = 0;
if( Residency != -1i64 )
v3 = Residency;
ResidencyIdleState = PopPepComponentGetResidencyIdleState((__int64)v5, v3);
v7 = PopPepLockActivityLink((__int64)Device, (INT64 *)v5, 6u, 1u, &v13);
*((_QWORD *)v5 + 16) = v3;
v8 = v7;
*((_QWORD *)v5 + 15) = v3;
if( v5[40] != ResidencyIdleState )
{
v5[40] = ResidencyIdleState;
ready = PopPepCountReadyActivities((unsigned int *)Device, (__int64)v5, 2);
PopPepUpdateIdleState((__int64)Device, v5, 1);
PopPepPromoteActivities((__int64)Device, (__int64)v5, 2);
v10 = PopPepCountReadyActivities((unsigned int *)Device, (__int64)v5, 2);
PopPepRequestWork(ready, v10, v11, v12);
}
PopPepReleaseActivityLink((__int64)Device, (INT64 *)v5, v8, v13);
}Referenced by:
PoFxSetComponentResidency