-/*
+/* $Id$
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/irq.c
* PURPOSE: IRQ handling
- * PROGRAMMER: David Welch (welch@mcmail.com)
+ *
+ * PROGRAMMERS: David Welch (welch@mcmail.com)
*/
/* INCLUDES *****************************************************************/
#define NDEBUG
#include <internal/debug.h>
-/* GLOBALS *****************************************************************/
-
-#define TAG_KINTERRUPT TAG('K', 'I', 'S', 'R')
-
/* FUNCTIONS *****************************************************************/
/*
/*
* FUNCTION: Registers a driver's isr to be called when its device interrupts
* ARGUMENTS:
- * InterruptObject (OUT) = Points to the interrupt object created on
+ * InterruptObject (OUT) = Points to the interrupt object created on
* return
* ServiceRoutine = Routine to be called when the device interrupts
* ServiceContext = Parameter to be passed to ServiceRoutine
* access between the isr and other driver routines. This is
* required if the isr handles more than one vector or the
* driver has more than one isr
- * Vector = Interrupt vector to allocate
+ * Vector = Interrupt vector to allocate
* (returned from HalGetInterruptVector)
* Irql = DIRQL returned from HalGetInterruptVector
* SynchronizeIrql = DIRQL at which the isr will execute. This must
{
PKINTERRUPT Interrupt;
ULONG i, count;
-
+
ASSERT_IRQL(PASSIVE_LEVEL);
-
+
DPRINT("IoConnectInterrupt(Vector %x)\n",Vector);
-
+
ProcessorEnableMask &= ((1 << KeNumberProcessors) - 1);
if (ProcessorEnableMask == 0)
{
return STATUS_INVALID_PARAMETER;
}
-
+
for (i = 0, count = 0; i < KeNumberProcessors; i++)
{
if (ProcessorEnableMask & (1 << i))
{
for (i = 0; i < count; i++)
{
- KeDisconnectInterrupt(&Interrupt[i]);
+ if (ProcessorEnableMask & (1 << i))
+ {
+ KeDisconnectInterrupt(&Interrupt[i]);
+ }
}
ExFreePool(Interrupt);
return STATUS_INVALID_PARAMETER;