Geoff Chappell - Software Analyst
This function initialises an interrupt object for a processor.
Unusually for an exported function, KeInitializeInterrupt exists in three different forms:
VOID KeInitializeInterrupt ( KINTERRUPT *Interrupt, KSERVICE_ROUTINE *ServiceRoutine, KMESSAGE_SERVICE_ROUTINE *MessageServiceRoutine, PVOID ServiceContext, ULONG MessageId, KSPIN_LOCK *SpinLock, ULONG Vector, KIRQL Irql, KIRQL SynchronizeIrql, KINTERRUPT_MODE InterruptMode, BOOLEAN ShareVector, ULONG Number, BOOLEAN FloatingSave);
nowadays, but with a different type for one argument before version 6.1:
VOID KeInitializeInterrupt ( KINTERRUPT *Interrupt, KSERVICE_ROUTINE *ServiceRoutine, KMESSAGE_SERVICE_ROUTINE *MessageServiceRoutine, PVOID ServiceContext, ULONG MessageId, KSPIN_LOCK *SpinLock, ULONG Vector, KIRQL Irql, KIRQL SynchronizeIrql, KINTERRUPT_MODE InterruptMode, BOOLEAN ShareVector, CCHAR Number, BOOLEAN FloatingSave);
and with two fewer arguments before version 6.0:
VOID KeInitializeInterrupt ( KINTERRUPT *Interrupt, KSERVICE_ROUTINE *ServiceRoutine, PVOID ServiceContext, KSPIN_LOCK *SpinLock, ULONG Vector, KIRQL Irql, KIRQL SynchronizeIrql, KINTERRUPT_MODE InterruptMode, BOOLEAN ShareVector, CCHAR Number, BOOLEAN FloatingSave);
The Interrupt argument points to the interrupt object that is to be initialised.
The ServiceRoutine argument is the address of a caller-supplied routine that is to be called back on subsequent occurrences of the indicated interrupt. This can be NULL in version 6.0 and higher to set a message service routine instead.
The MessageServiceRoutine argument is the address of a caller-supplied routine that is to be called back on subsequent occurrences of the indicated interrupt. This argument is ignored unless the ServiceRoutine argument is NULL.
The ServiceContext argument is arbitrary caller-supplied context that is to be passed back to the caller as an argument to the service routine or message service routine on subsquent occurrences of the indicated interrupt.
The MessageId argument is the 0-based index for the
The optional SpinLock argument is the address of a spin lock that is to be held when executing the service routine (and other caller-supplied routines in connection with the interrupt). In 64-bit Windows, this argument can be a special value
The Vector argument tells which interrupt vector to handle.
The Irql argument specifies the Interrupt Request Level (IRQL)
The SynchronizeIrql argument specifies the IRQL at which to execute the service routine (and other caller-supplied routines in connection with the interrupt).
The InterruptMode argument tells
The ShareVector argument is non-zero if handling can be chained.
The Number argument is the 0-based system-wide processor index to tell which processor the interrupt object is initialised for.
The FloatingSave argument is non-zero if floating-point state is to be saved and restored across each occurrence of the interrupt.
The KeInitializeInterrupt function is exported by name from the kernel in all known versions, i.e., 3.10 and higher.
The KeInitializeInterrupt function is not documented.