KeSynchronizeExecution

BOOLEAN
KeSynchronizeExecution(

IN PKINTERRUPT Interrupt,
IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
IN PVOID SynchronizeContext
);

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

Parameters

Interrupt

Is a pointer to a set of interrupt objects. This pointer was returned by IoConnectInterrupt.

SynchronizeRoutine

Is the entry point for a caller-supplied SynchCritSection routine whose execution is to be synchronized with the execution of the ISR associated with the interrupt object(s). A SynchronizeRoutine is declared as follows:

BOOLEAN

(*PKSYNCHRONIZE_ROUTINE) (

    IN PVOID SynchronizeContext

    );

SynchronizeContext

Points to a caller-supplied context area to be passed to the SynchronizeRoutine when it is called.

Return Value

KeSynchronizeExecution returns TRUE if the operation succeeds.

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 SynchronizeRoutine is called with the input pointer to SynchronizeContext.

The caller-supplied SynchronizeRoutine 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 ISR(s) with IoConnectInterrupt.

See Also

IoConnectInterrupt