KeRevertToUserGroupAffinityThread
VOID __stdcall KeRevertToUserGroupAffinityThread(PGROUP_AFFINITY PreviousAffinity){
PGROUP_AFFINITY v1;
_ETHREAD *CurrentThread;
unsigned __int8 CurrentIrql;
struct _KPRCB *CurrentPrcb;
unsigned int v5;
unsigned int v6;
unsigned int v7;
int Group;
unsigned __int64 v9;
bool v10;
UINT64 SpinCount;
__int64 v12;
v1 = PreviousAffinity;
v12 = 0i64;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
if( (*((_DWORD *)CurrentThread + 29) & 8) != 0
&& !(PreviousAffinity->Reserved[0] | (unsigned __int16)(PreviousAffinity->Reserved[1] | PreviousAffinity->Reserved[2])) )
{
if( !PreviousAffinity->Mask
|| (Group = PreviousAffinity->Group, (unsigned __int16)Group < KeActiveProcessors.Count)
&& (v9 = KeActiveProcessors.Bitmap[Group], v10 = (v9 & v1->Mask) == 0, v1->Mask &= v9, !v10) )
{
CurrentIrql = KeGetCurrentIrql();
__writecr8(2ui64);
CurrentPrcb = KeGetCurrentPrcb();
LODWORD(SpinCount) = 0;
while( _interlockedbittestandset64((volatile signed __int32 *)CurrentThread + 16, 0i64) )
{
do
KeYieldProcessorEx(&SpinCount);
while( *((_QWORD *)CurrentThread + 8) );
}
v5 = *((_DWORD *)CurrentThread + 147);
if( v1->Mask )
{
v6 = 1280;
}
else
{
v6 = *((_DWORD *)CurrentThread + 49);
v1 = (PGROUP_AFFINITY)((char *)CurrentThread + 552);
*((_DWORD *)CurrentThread + 29) &= ~8u;
}
KiSetSystemAffinityThread((__int64)CurrentPrcb, (__int64)v1, v6, (__int64)&v12);
v7 = *((_DWORD *)CurrentThread + 147);
KiReleaseThreadLockSafe((INT64)CurrentThread);
if( (xmmword_140CFB490 & 0x8000000) != 0 )
EtwTraceIdealProcessor((INT64)CurrentThread, 0x546u, v5, v7);
KiProcessDeferredReadyList((__int64)CurrentPrcb, &v12, CurrentIrql);
}
}
}Referenced by:
CmInitializeProcessor
CmpInitializeMachineDependentConfiguration
EmonMarkCountersReserved
EmonReleaseReservedCounters
ExAllocateCacheAwarePushLock
ExpSaPageGroupDescriptorAllocate
ExpWorkerThread
HalGetEnvironmentVariableEx
HalQueryEnvironmentVariableInfoEx
HalSetEnvironmentVariableEx
HalpAllocatePmcCounterSet
HalpCmcWorkerRoutine
HalpCmciInit
HalpCreateMachineCheckErrorRecord
HalpEnumerateEnvironmentVariablesWithFilter
HalpFreePmcCounterSet
HalpHandlePreviousMcaErrors
HalpLoadMicrocode
HalpMceInit
HalpQueryCapsuleCapabilities
HalpTimerStallExecutionProcessor
HalpUpdateCapsule
IopLiveDumpUncorralProcessors
IopPassiveInterruptWorker
KeGenericProcessorCallback
KeMaskInterrupt
KeRevertToUserAffinityThread
KeRevertToUserAffinityThreadEx
KeStallExecutionProcessor
KiAttemptBugcheckRecovery
KiComputeNumaCosts
KiConnectInterrupt
KiDeregisterNmiSxCallback
KiDisconnectInterruptCommon
KiDynamicProcessorInitialization
KiInitMachineDependent
KiInterruptDispatchCommon
MakeGdtReadOnly
MiCombineAllPhysicalMemory
MiSetIdealProcessorThread
MiTimeSingleLargePageZero
PnpCallAddDevice
PnpSendIrp
PpmClearSimulatedIdle
PpmIdleInitializeConcurrency
PpmInstallFeedbackCounters
PpmSetSimulatedIdle
ViIsBTSSupported
ViSetupBTSPerProcNoEnable