WUDF_INTERRUPT_WORKITEM callback function

[Applies to UMDF 1.x only]

A driver's OnInterruptWorkItem event callback function processes interrupt information that the driver's OnInterruptIsr callback function has stored.

Syntax


WUDF_INTERRUPT_WORKITEM OnInterruptWorkItem;

void OnInterruptWorkItem(
  _In_ IWDFInterrupt *Interrupt,
  _In_ IWDFObject    *AssociatedObject
)
{ ... }

Parameters

Interrupt [in]

A pointer to the interrupt object interface associated with the work item.

AssociatedObject [in]

A pointer to the associated object.

Return value

This callback function does not return a value.

Remarks

To register an OnInterruptWorkItem callback function, your driver must place the callback function's address in a WUDF_INTERRUPT_CONFIG structure before calling IWDFDevice3::CreateInterrupt.

After stopping and acknowledging the interrupt, the driver should return quickly from its OnInterruptIsr callback, postponing any additional processing to a OnInterruptWorkItem callback.

For more information about handling interrupts in UMDF drivers, see Accessing Hardware and Handling Interrupts.

Examples

The function type is declared in Wudfworkitem.h, as follows.


typedef
_Function_class_(WUDF_INTERRUPT_WORKITEM)
VOID
WUDF_INTERRUPT_WORKITEM(
    _In_
    IWDFInterrupt* Interrupt,
    _In_
    IWDFObject* AssociatedObject
    );

typedef WUDF_INTERRUPT_WORKITEM *PFN_WUDF_INTERRUPT_WORKITEM;

To define an OnInterruptWorkItem callback function that is named MyInterruptWorkItem, you must first provide a function declaration that SDV and other verification tools require, as follows:


WUDF_INTERRUPT_WORKITEM  MyInterruptWorkItem;

Then, implement your callback function as follows:


VOID
  MyInterruptWorkItem (
    _In_
    IWDFInterrupt* Interrupt,
    _In_
    IWDFObject* AssociatedObject
    )
  {…}


Requirements

Target platform

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.11

Header

Wudfinterrupt.h

See also

WUDF_INTERRUPT_CONFIG
IWDFDevice3::CreateInterrupt

 

 

Send comments about this topic to Microsoft

Show: