Bewerken

Delen via


WdfInterruptQueueWorkItemForIsr function (wdfinterrupt.h)

[Applies to KMDF and UMDF]

The WdfInterruptQueueWorkItemForIsr method queues a framework interrupt object's EvtInterruptWorkItem callback function for execution.

Syntax

BOOLEAN WdfInterruptQueueWorkItemForIsr(
  [in] WDFINTERRUPT Interrupt
);

Parameters

[in] Interrupt

A handle to a framework interrupt object.

Return value

If the driver's ISR is running at IRQL = PASSIVE_LEVEL, WdfInterruptQueueWorkItemForIsr returns TRUE if it successfully queues the interrupt object's EvtInterruptWorkItem callback function. The method returns FALSE if the callback function was previously queued and has not executed.

If the driver's ISR is running at IRQL = DIRQL, the framework first queues an internal DPC and then queues a work item from that DPC. In this case, WdfInterruptQueueWorkItemForIsr returns TRUE if the framework successfully queues the internal DPC. The method returns FALSE if the internal DPC was previously queued.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

Drivers typically call WdfInterruptQueueWorkItemForIsr from within an EvtInterruptIsr callback function.

An interrupt object's EvtInterruptWorkItem callback function can be queued only once before it executes. Therefore, if a call to WdfInterruptQueueWorkItemForIsr succeeds, subsequent calls will not queue additional callbacks.

For more information about handling interrupts in framework-based drivers, see Handling Hardware Interrupts.

A bug check occurs if drivers call WdfInterruptQueueWorkItemForIsr with an interrupt object that does not specify an EvtInterruptWorkItem callback function.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.11
Minimum UMDF version 2.0
Header wdfinterrupt.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <=DIRQL
DDI compliance rules DriverCreate(kmdf)

See also

EvtInterruptDpc

EvtInterruptIsr

WdfInterruptCreate

WdfInterruptQueueDpcForIsr