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.
BOOLEAN KeSynchronizeExecution( PKINTERRUPT Interrupt, PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, __drv_aliasesMem PVOID SynchronizeContext );
Specifies a caller-supplied SynchCritSection routine whose execution is to be synchronized with the execution of the ISR assigned to the interrupt objects.
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:
- The IRQL is raised to the SynchronizeIrql value specified in the call to IoConnectInterrupt or IoConnectInterruptEx.
- Access to SynchronizeContext is synchronized with the assigned ISR by acquiring the associated interrupt object spin lock (or system event object, in the case of an ISR that runs at PASSIVE_LEVEL).
- The specified SynchCritSection routine is called with the SynchronizeContext value as its parameter.
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.
|Minimum supported client||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|IRQL||<= DIRQL (see Remarks section)|