EvtInterruptSynchronize

A driver's EvtInterruptSynchronize event callback function performs operations that must be synchronized with an EvtInterruptIsr callback function.

構文

EVT_WDF_INTERRUPT_SYNCHRONIZE EvtInterruptSynchronize;

BOOLEAN EvtInterruptSynchronize(
  __in  WDFINTERRUPT Interrupt,
  __in  WDFCONTEXT Context
)
{ ... }

パラメーター

Interrupt [in]

A handle to a framework interrupt object.

Context [in]

Driver-supplied information that the driver specifies when it calls WdfInterruptSynchronize.

戻り値

The EvtInterruptSynchronize callback function must return TRUE if the operation succeeds. Otherwise, this function must return FALSE.

解説

To execute an EvtInterruptSynchronize callback function, the driver must call WdfInterruptSynchronize.

Before calling the EvtInterruptSynchronize callback function, the framework raises the processor's IRQL to the device's DIRQL and acquires the spin lock that the driver specified in the interrupt object's WDF_INTERRUPT_CONFIG structure.

As a result, while an EvtInterruptSynchronize callback function is executing, the interrupt object's EvtInterruptIsr callback function (and any other code that executes at DIRQL while holding the spin lock) cannot execute.

EvtInterruptSynchronize callback functions must be designed so that they execute for only a short period of time. They are typically used to access interrupt data that is also accessed by an interrupt object's other EvtInterruptSynchronize or EvtInterruptIsr callback functions.

For more information about the EvtInterruptSynchronize callback function, see Synchronizing Interrupt Code.

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

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

typedef BOOLEAN
  (EVT_WDF_INTERRUPT_SYNCHRONIZE) (
    IN WDFINTERRUPT  Interrupt,
    IN WDFCONTEXT  Context
    );

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

EVT_WDF_INTERRUPT_SYNCHRONIZE  MyInterruptSynchronize;

Then, implement your callback function as follows:

BOOLEAN
 MyInterruptSynchronize (
    IN WDFINTERRUPT  Interrupt,
    IN WDFCONTEXT  Context
    )
  {...}

要件

バージョン

Supported by version 1.0 and later versions of KMDF.

ヘッダー

Wdfinterrupt.h (includeWdf.h)

参照

WdfInterruptSynchronize
WDF_INTERRUPT_CONFIG
EvtInterruptIsr

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft