Previous Next

KeSynchronizeExecution

The KeSynchronizeExecution routine synchronizes the execution of a given routine with that of the ISR associated with the given interrupt object pointer.

BOOLEAN 
  KeSynchronizeExecution(
    IN PKINTERRUPT    Interrupt,
    IN PKSYNCHRONIZE_ROUTINE  SynchronizeRoutine,
    IN PVOID  SynchronizeContext
    );

Parameters

Interrupt
Specifies a pointer to a set of interrupt objects. This pointer was returned by IoConnectInterrupt.
SynchronizeRoutine
Specifies a caller-supplied SynchCritSection routine whose execution is to be synchronized with the execution of the ISR associated with the interrupt objects.
SynchronizeContext
Pointer to a caller-supplied context area to be passed to the SynchCritSection routine when it is called.

Return Value

KeSynchronizeExecution returns TRUE if the operation succeeds.

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

When this routine is called, the following occurs:

  1. The IRQL is raised to the SynchronizeIrql specified in the call to IoConnectInterrupt.
  2. Access to SynchronizeContext is synchronized with the corresponding ISR by acquiring the associated interrupt object spin lock.
  3. The specified SynchCritSection routine is called with the SynchronizeContext value as its parameter.

The SynchCritSection routine runs at DIRQL, so it must execute very quickly.

Callers of KeSynchronizeExecution must be running at IRQL <= DIRQL, that is, less than or equal to the value of the SynchronizeIrql parameter specified when the caller registered its ISRs with IoConnectInterrupt.

See Also

IoConnectInterrupt