KeQueryNodeActiveAffinity
VOID __stdcall KeQueryNodeActiveAffinity(USHORT NodeNumber, PGROUP_AFFINITY Affinity, PUSHORT Count){
__int64 v3;
unsigned __int64 v4;
if( Affinity )
*Affinity = 0i64;
if( Count )
*Count = 0;
if( NodeNumber < (unsigned __int16)KeNumberNodes )
{
_mm_lfence();
v3 = *((_QWORD *)&KeNodeBlock + NodeNumber);
if( Affinity )
{
Affinity->Group = *(_WORD *)(v3 + 144);
Affinity->Mask = *(_QWORD *)(v3 + 136);
}
if( Count )
{
v4 = *(_QWORD *)(v3 + 136) - ((*(_QWORD *)(v3 + 136) >> 1) & 0x5555555555555555i64);
*Count = (0x101010101010101i64
* (((v4 & 0x3333333333333333i64)
+ ((v4 >> 2) & 0x3333333333333333i64)
+ (((v4 & 0x3333333333333333i64) + ((v4 >> 2) & 0x3333333333333333i64)) >> 4)) & 0xF0F0F0F0F0F0F0Fi64)) >> 56;
}
}
}Referenced by:
EtwpProcessorRundown
ExAllocateCacheAwarePushLock
ExProcessorCounterSetCallback
ExpNodeCreateSystemThread
ExpPartitionStart
ExpQueryNumaProcessorMap
ExpSaPageGroupDescriptorAllocate
ExpWorkQueueInitialize
ExpWorkQueueManagerInitialize
ExpWorkQueueManagerThread
ExpWorkerThread
KeQueryNodeActiveDpcGangAffinity
KiConfigureSchedulingInformation
MiComputeIdealDpcGang
MiComputeMemoryNodeProcessorAssignments
MiCreateColorAnchors
MiGetClosestNodeWithProcessors
PnpSetDeviceAffinityThread
PpmParkRegisterParking