The KeFlushQueuedDpcs routine returns after all queued DPCs on all processors have executed.
NTKERNELAPI
VOID
KeFlushQueuedDpcs (
VOID
);
None
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
Drivers can use this routine to wait until all currently-queued DPCs are run. Note that KeFlushQueuedDpcs can take a long time to return, so drivers should not use it along any critical code paths.
Callers of this routine must be running at IRQL = PASSIVE_LEVEL.
IoInitializeDpcRequest, IoRequestDpc, KeInitializeDpc, KeInsertQueueDpc