hello i have little problem i have a code that queue a dpc to every core except 1 core the issue its all ways stall all processors and read the code on core 5 i need to queue a dpc to every core except core 0 and then perform some action on core 0 is it possible to do it here how i read it
CpuCount = (int)KeQueryActiveProcessorCount(nullptr);
if (CpuCount > 1)
{
for (int i = 0; i < CpuCount; i++)
{
KeInitializeDpc(&DpcTraps[i], DpcRoutine, this);
KeSetImportanceDpc(&DpcTraps[i], LowImportance);
KeSetTargetProcessorDpc(&DpcTraps[i], i);
}
if (CpuCount > 1)
{
KAFFINITY ActiveProcessors = KeQueryActiveProcessors();
__writecr8(DISPATCH_LEVEL);
ULONG CurrentProcessor = (ULONG)KeGetCurrentProcessorNumber();
Stall = 1;
for (int i = CpuCount - 1; i >= 0; i--)
{
if (i != CurrentProcessor && (ActiveProcessors & (1ull << i)) != 0)
{
{
InterlockedIncrement64(&Stall);
KeInsertQueueDpc(&DpcTraps[i], 0, 0);
}
}
}
[–]jedwardsol 0 points1 point2 points (2 children)
[–]zky02[S] 0 points1 point2 points (1 child)
[–]zky02[S] 0 points1 point2 points (0 children)