// wdm.h
BOOLEAN KeSynchronizeExecution(
[in, out] PKINTERRUPT Interrupt,
[in] PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
[in, optional] __drv_aliasesMem PVOID SynchronizeContext
);
View the official Windows Driver Kit DDI reference
No description available.
The KeSynchronizeExecution routine synchronizes the execution of the specified routine with the interrupt service routine (ISR) that is assigned to a set of one or more interrupt objects.
Interrupt
[in, out]A pointer to a set of interrupt objects. The caller obtained this pointer from the IoConnectInterrupt or IoConnectInterruptEx routine.
SynchronizeRoutine
[in]Specifies a caller-supplied SynchCritSection routine whose execution is to be synchronized with the execution of the ISR assigned to the interrupt objects.
SynchronizeContext
[in, optional]A pointer to a caller-supplied context value to be passed to the SynchCritSection routine when it is called.
KeSynchronizeExecution returns TRUE if the operation succeeds. Otherwise, it returns FALSE.
When this routine is called, the following occurs:
If the ISR runs at DIRQL >= DISPATCH_LEVEL, the SynchCritSection routine runs at the same DIRQL and must therefore run for as brief a time as possible to avoid delaying other high-priority tasks.
Callers of KeSynchronizeExecution must be running at IRQL <= DIRQL; that is, at an IRQL that is less than or equal to the value of the SynchronizeIrql value that the caller specified when it registered its ISR with IoConnectInterrupt or IoConnectInterruptEx.
Starting with Windows 8, a driver can call KeSynchronizeExecution to synchronize execution of a SynchCritSection routine with an ISR that runs at IRQL = PASSIVE_LEVEL. In earlier versions of Windows, KeSynchronizeExecution can synchronize execution only with an ISR that runs at IRQL >= DISPATCH_LEVEL. For more information, see Using Passive-Level Interrupt Service Routines.