Bewerken

Delen via


IInterruptSync interface (portcls.h)

The IInterruptSync interface represents an interrupt sync object that synchronizes the execution of a list of interrupt service routines (ISRs) with non-ISR routines. The PortCls system driver implements this interface and exposes it to the adapter driver. A miniport driver obtains a reference to an IInterruptSync object by calling the PortCls function PcNewInterruptSync, which creates a new IInterruptSync object that connects to an interrupt resource. IInterruptSync inherits from the IUnknown interface.

The IInterruptSync::RegisterServiceRoutine method associates an ISR with a sync object. More than one ISR can be associated with a single sync object. When the interrupt occurs, the sync object executes the ISRs in the list in a specified order and manner according to the PcNewInterruptSync function's Mode parameter.

Another facet of IInterruptSync is its ability to synchronize execution of ISRs with other routines that are not ISRs. Once a non-ISR routine is passed to IInterruptSync::CallSynchronizedRoutine and begins running, execution of any ISRs that are registered with the sync object is guaranteed to be held off until that routine has finished running.

Both the RegisterServiceRoutine and CallSynchronizedRoutine methods accept function pointers of type PINTERRUPTSYNCROUTINE, which is defined as follows:

  typedef NTSTATUS (*PINTERRUPTSYNCROUTINE)
  (
      IN  struct IInterruptSync *InterruptSync,
      IN  PVOID                  DynamicContext
  );

The InterruptSync member is a pointer to the sync object. The DynamicContext member contains a context value that is passed to the routine when it is called.

For more information, see Interrupt Sync Objects.

Inheritance

The IInterruptSync interface inherits from the IUnknown interface.

Methods

The IInterruptSync interface has these methods.

 
IInterruptSync::CallSynchronizedRoutine

The CallSynchronizedRoutine method calls a routine that is not an interrupt service routine (ISR) but whose execution needs to be synchronized with ISRs.
IInterruptSync::Connect

The Connect method connects the synchronization object to the interrupt.
IInterruptSync::Disconnect

The Disconnect method disconnects the synchronization object from the interrupt.
IInterruptSync::GetKInterrupt

The GetKInterrupt method gets a WDM interrupt object from a port-class synchronization object.
IInterruptSync::RegisterServiceRoutine

The RegisterServiceRoutine method registers an interrupt service routine (ISR) that is to be called when an interrupt occurs.

Requirements

Requirement Value
Target Platform Windows
Header portcls.h