WdfInterruptQueueDpcForIsr method

[Applies to KMDF and UMDF]

The WdfInterruptQueueDpcForIsr method queues a framework interrupt object's EvtInterruptDpc callback function for execution.

Syntax


BOOLEAN WdfInterruptQueueDpcForIsr(
  [in]  WDFINTERRUPT Interrupt
);

Parameters

Interrupt [in]

A handle to a framework interrupt object.

Return value

WdfInterruptQueueDpcForIsr returns TRUE if it successfully queues the interrupt object's EvtInterruptDpc callback function. The method returns FALSE if the callback function was previously queued and has not executed.

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

Remarks

Drivers typically call WdfInterruptQueueDpcForIsr from within an EvtInterruptIsr callback function.

An interrupt object's EvtInterruptDpc callback function can be queued only once before it executes. Therefore, if a call to WdfInterruptQueueDpcForIsr succeeds, subsequent calls will return FALSE until the framework dequeues and executes the EvtInterruptIsr callback function.

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

In KMDF 1.11 and later, a driver can call WdfInterruptQueueDpcForIsr from a passive-level ISR. Note that a driver can register a work item or a DPC but not both.

Examples

The following code example shows how an EvtInterruptIsr callback function should queue an EvtInterruptDpc callback function.


BOOLEAN
MyEvtInterruptIsr(
    IN WDFINTERRUPT Interrupt,
    IN ULONG  MessageID
    )
{
    BOOLEAN queueDpcSuccess;

    //
    // Save interrupt information for the
    // EvtInterruptDpc function.
    //
...
    //
    // Queue the EvtInterruptDpc function.
    //
    queueDpcSuccess = WdfInterruptQueueDpcForIsr(Interrupt);
...
}

Requirements

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfinterrupt.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

<=DIRQL

DDI compliance rules

DriverCreate

See also

WdfInterruptCreate
EvtInterruptDpc
EvtInterruptIsr

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft