In cycles of repeated suspend/resume attempt to make sure other threads
get to run by:
a) Dropping the priority of the suspend thread as low as possible.
b) Deliberately waiting for DPSc on other CPUs to complete before
checking xenstore again.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Affinity.Mask = (KAFFINITY)1;
KeSetSystemGroupAffinityThread(&Affinity, NULL);
+ (VOID) KeSetPriorityThread(KeGetCurrentThread(),
+ LOW_PRIORITY);
+
Event = ThreadGetEvent(Self);
for (;;) {
__FdoSuspendClearActive(Fdo);
+ KeFlushQueuedDpcs();
+
loop:
KeSetEvent(&Fdo->SuspendEvent, IO_NO_INCREMENT, FALSE);
}