Converting an Ordinary DPC to a Threaded DPC

Converting an ordinary DPC to a threaded DPC is straightforward. Simply replace the call to KeInitializeDpc (which initializes the DPC) with one to KeInitializeThreadedDpc, and refer to the following table to replace the calls inside the DPC routine that acquire and release spin locks.

Ordinary DPC call Corresponding threaded DPC call

KeAcquireSpinLockAtDpcLevel

KeAcquireSpinLockForDpc

KeReleaseSpinLockFromDpcLevel

KeReleaseSpinLockForDpc

KeAcquireInStackQueuedSpinLockAtDpcLevel

KeAcquireInStackQueuedSpinLockForDpc

KeReleaseInStackQueuedSpinLockFromDpcLevel

KeReleaseInStackQueuedSpinLockForDpc

You do not need to change calls to other spin lock routines, such as KeAcquireSpinLock or KeAcquireInStackQueuedSpinLock.