EVT_WDF_INTERRUPT_DPC callback function (wdfinterrupt.h)
[Applies to KMDF and UMDF]
A driver's EvtInterruptDpc event callback function processes interrupt information that the driver's EvtInterruptIsr callback function has stored.
Syntax
EVT_WDF_INTERRUPT_DPC EvtWdfInterruptDpc;
void EvtWdfInterruptDpc(
[in] WDFINTERRUPT Interrupt,
[in] WDFOBJECT AssociatedObject
)
{...}
Parameters
[in] Interrupt
A handle to a framework interrupt object.
[in] AssociatedObject
A handle to the framework device object that the driver passed to WdfInterruptCreate.
Return value
None
Remarks
To register an EvtInterruptDpc callback function, your driver must place the callback function's address in a WDF_INTERRUPT_CONFIG structure before calling WdfInterruptCreate.
Drivers typically complete I/O requests in their EvtInterruptDpc callback functions.
The EvtInterruptDpc callback function executes at DISPATCH_LEVEL and must not access pageable code. If an EvtInterruptDpc callback function must perform operations at IRQL = PASSIVE_LEVEL, it can use framework work items.
In KMDF version 1.11 and later, your driver can support passive-level interrupts and provide either an EvtInterruptWorkItem or an EvtInterruptDpc callback function. If your driver supports passive-level interrupts and provides an EvtInterruptDpc callback function, the driver cannot acquire the passive-level interrupt lock from within the callback.
Most drivers use a single EvtInterruptDpc callback function for each type of interrupt. If your driver creates multiple framework queue objects for each device, you might consider using a separate DPC object and EvtDpcFunc callback function for each queue.
To schedule execution of an EvtInterruptDpc callback function, the driver must call WdfInterruptQueueDpcForIsr from within the EvtInterruptIsr callback function.
When a driver schedules the execution of an EvtInterruptDpc callback function, the system adds a DPC object to the system's DPC queue. If the system is not executing higher-priority tasks, it removes the object from the queue and calls the EvtInterruptDpc callback function.
The system does not add the DPC object to the DPC queue if the object is already queued. An EvtInterruptIsr callback function might be called several times before the system calls the EvtInterruptDpc callback function. Therefore, the EvtInterruptDpc callback function must be able to process information from several interrupts, and it must process all interrupts that have occurred since the last time it was called.
Typically, it is necessary to synchronize the execution of a driver's EvtInterruptDpc callback function with the execution of other callback functions. For more information, see Synchronizing Interrupt Code.
For more information about handling interrupts in framework-based drivers, see Handling Hardware Interrupts.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfinterrupt.h (include Wdf.h) |
IRQL | (See Remarks section.) |