Partager via


KeSynchronizeExecution, fonction (wdm.h)

La routine KeSynchronizeExecution synchronise l’exécution de la routine spécifiée avec la routine de service d’interruption (ISR) affectée à un ensemble d’un ou plusieurs objets d’interruption.

Syntaxe

BOOLEAN KeSynchronizeExecution(
  [in, out]      PKINTERRUPT            Interrupt,
  [in]           PKSYNCHRONIZE_ROUTINE  SynchronizeRoutine,
  [in, optional] __drv_aliasesMem PVOID SynchronizeContext
);

Paramètres

[in, out] Interrupt

Pointeur vers un ensemble d’objets d’interruption. L’appelant a obtenu ce pointeur à partir de la routine IoConnectInterrupt ou IoConnectInterruptEx.

[in] SynchronizeRoutine

Spécifie un synchCritSection fourni par l’appelant routine dont l’exécution doit être synchronisée avec l’exécution de l’ISR affecté aux objets d’interruption.

[in, optional] SynchronizeContext

Pointeur vers une valeur de contexte fournie par l’appelant à passer à la routine SynchCritSection lorsqu’elle est appelée.

Valeur de retour

KeSynchronizeExecution retourne TRUE si l’opération réussit. Sinon, elle retourne FALSE.

Remarques

Lorsque cette routine est appelée, les éléments suivants se produisent :

  1. Le runtime d’intégration est déclenché sur la valeur SynchronizeIrql spécifiée dans l’appel à IoConnectInterrupt ou IoConnectInterruptEx.
  2. L’accès à synchronizeContext est synchronisé avec l’ISR affecté en acquérant le verrou de rotation d’objet d’interruption associé (ou objet d’événement système, dans le cas d’un ISR qui s’exécute à PASSIVE_LEVEL).
  3. La routine SynchCritSection spécifiée est appelée avec la valeur SynchronizeContext en tant que paramètre.
Si l’ISR s’exécute à DIRQL >= DISPATCH_LEVEL, la routine SynchCritSection s’exécute au même niveau DIRQL et doit donc s’exécuter aussi rapidement que possible pour éviter de retarder d’autres tâches à priorité élevée.

Les appelants de KeSynchronizeExecution doivent s’exécuter à l'<IRQL = DIRQL ; autrement dit, au niveau d’un IRQL inférieur ou égal à la valeur de l'SynchronizeIrql valeur spécifiée par l’appelant lorsqu’il a inscrit son ISR avec IoConnectInterrupt ou IoConnectInterruptEx.

À compter de Windows 8, un pilote peut appeler KeSynchronizeExecution pour synchroniser l’exécution d’une routine SynchCritSection avec un ISR qui s’exécute à IRQL = PASSIVE_LEVEL. Dans les versions antérieures de Windows, KeSynchronizeExecution ne peut synchroniser l’exécution qu’avec un ISR qui s’exécute à IRQL >= DISPATCH_LEVEL. Pour plus d’informations, consultez Utilisation des routines de service d’interruption Passive-Level.

Exigences

Exigence Valeur
client minimum pris en charge Disponible à partir de Windows 2000.
plateforme cible Universel
d’en-tête wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
bibliothèque NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DIRQL (voir la section Remarques)

Voir aussi

IoConnectInterrupt

IoConnectInterruptEx