KeRaiseIrqlToDpcLevel
KeRaiseIrqlToDpcLevel is a kernel-mode routine in the Windows operating system that raises the current IRQL (Interrupt Request Level) to the DISPATCH_LEVEL, the IRQL at which DPCs (Deferred Procedure Calls) run. The function records the caller’s previous IRQL in an out parameter so that it can be restored later, typically with KeLowerIrql. By elevating to DPC level, the code prevents normal thread preemption and APC delivery while still allowing DPCs to execute, enabling short, non-blocking critical sections that must not be interrupted by thread scheduling.
Usage and behavior: The routine is used in low-level driver code that needs to protect a small,
Constraints and considerations: Raising IRQL to DPC level disables certain kernel activities and can impact system
Related concepts: KeLowerIrql reverts the IRQL to the previous level. Other related routines include KeRaiseIrqlToSynchLevel for
See also: KeLowerIrql, KeRaiseIrqlToSynchLevel, spin-lock APIs, DPCs, IRQL concept.