[NTOS:FORMATTING]
[reactos.git] / reactos / ntoskrnl / ke / i386 / irqobj.c
index dcb4a1e..6a18fe1 100644 (file)
@@ -143,7 +143,7 @@ KiExitInterrupt(IN PKTRAP_FRAME TrapFrame,
         _disable();
         HalEndSystemInterrupt(OldIrql, TrapFrame);
     }
         _disable();
         HalEndSystemInterrupt(OldIrql, TrapFrame);
     }
-    
+
     /* Now exit the trap */
     KiEoiHelper(TrapFrame);
 }
     /* Now exit the trap */
     KiEoiHelper(TrapFrame);
 }
@@ -154,25 +154,25 @@ KiUnexpectedInterrupt(VOID)
     /* Crash the machine */
     KeBugCheck(TRAP_CAUSE_UNKNOWN);
 }
     /* Crash the machine */
     KeBugCheck(TRAP_CAUSE_UNKNOWN);
 }
-    
+
 VOID
 FASTCALL
 KiUnexpectedInterruptTailHandler(IN PKTRAP_FRAME TrapFrame)
 {
     KIRQL OldIrql;
 VOID
 FASTCALL
 KiUnexpectedInterruptTailHandler(IN PKTRAP_FRAME TrapFrame)
 {
     KIRQL OldIrql;
-    
+
     /* Enter trap */
     KiEnterInterruptTrap(TrapFrame);
     /* Enter trap */
     KiEnterInterruptTrap(TrapFrame);
-    
+
     /* Increase interrupt count */
     KeGetCurrentPrcb()->InterruptCount++;
     /* Increase interrupt count */
     KeGetCurrentPrcb()->InterruptCount++;
-    
+
     /* Start the interrupt */
     if (HalBeginSystemInterrupt(HIGH_LEVEL, TrapFrame->ErrCode, &OldIrql))
     {
         /* Warn user */
         DPRINT1("\n\x7\x7!!! Unexpected Interrupt 0x%02lx !!!\n", TrapFrame->ErrCode);
     /* Start the interrupt */
     if (HalBeginSystemInterrupt(HIGH_LEVEL, TrapFrame->ErrCode, &OldIrql))
     {
         /* Warn user */
         DPRINT1("\n\x7\x7!!! Unexpected Interrupt 0x%02lx !!!\n", TrapFrame->ErrCode);
-        
+
         /* Now call the epilogue code */
         KiExitInterrupt(TrapFrame, OldIrql, FALSE);
     }
         /* Now call the epilogue code */
         KiExitInterrupt(TrapFrame, OldIrql, FALSE);
     }
@@ -194,12 +194,12 @@ VOID
 FASTCALL
 KiInterruptDispatch(IN PKTRAP_FRAME TrapFrame,
                     IN PKINTERRUPT Interrupt)
 FASTCALL
 KiInterruptDispatch(IN PKTRAP_FRAME TrapFrame,
                     IN PKINTERRUPT Interrupt)
-{       
+{
     KIRQL OldIrql;
 
     /* Increase interrupt count */
     KeGetCurrentPrcb()->InterruptCount++;
     KIRQL OldIrql;
 
     /* Increase interrupt count */
     KeGetCurrentPrcb()->InterruptCount++;
-    
+
     /* Begin the interrupt, making sure it's not spurious */
     if (HalBeginSystemInterrupt(Interrupt->SynchronizeIrql,
                                 Interrupt->Vector,
     /* Begin the interrupt, making sure it's not spurious */
     if (HalBeginSystemInterrupt(Interrupt->SynchronizeIrql,
                                 Interrupt->Vector,
@@ -207,13 +207,13 @@ KiInterruptDispatch(IN PKTRAP_FRAME TrapFrame,
     {
         /* Acquire interrupt lock */
         KxAcquireSpinLock(Interrupt->ActualLock);
     {
         /* Acquire interrupt lock */
         KxAcquireSpinLock(Interrupt->ActualLock);
-        
+
         /* Call the ISR */
         Interrupt->ServiceRoutine(Interrupt, Interrupt->ServiceContext);
         /* Call the ISR */
         Interrupt->ServiceRoutine(Interrupt, Interrupt->ServiceContext);
-        
+
         /* Release interrupt lock */
         KxReleaseSpinLock(Interrupt->ActualLock);
         /* Release interrupt lock */
         KxReleaseSpinLock(Interrupt->ActualLock);
-        
+
         /* Now call the epilogue code */
         KiExitInterrupt(TrapFrame, OldIrql, FALSE);
     }
         /* Now call the epilogue code */
         KiExitInterrupt(TrapFrame, OldIrql, FALSE);
     }
@@ -252,7 +252,7 @@ KiChainedDispatch(IN PKTRAP_FRAME TrapFrame,
                 /* Raise to higher IRQL */
                 OldInterruptIrql = KfRaiseIrql(Interrupt->SynchronizeIrql);
             }
                 /* Raise to higher IRQL */
                 OldInterruptIrql = KfRaiseIrql(Interrupt->SynchronizeIrql);
             }
-        
+
             /* Acquire interrupt lock */
             KxAcquireSpinLock(Interrupt->ActualLock);
 
             /* Acquire interrupt lock */
             KxAcquireSpinLock(Interrupt->ActualLock);
 
@@ -262,7 +262,7 @@ KiChainedDispatch(IN PKTRAP_FRAME TrapFrame,
 
             /* Release interrupt lock */
             KxReleaseSpinLock(Interrupt->ActualLock);
 
             /* Release interrupt lock */
             KxReleaseSpinLock(Interrupt->ActualLock);
-        
+
             /* Check if this interrupt's IRQL is higher than the current one */
             if (Interrupt->SynchronizeIrql > Interrupt->Irql)
             {
             /* Check if this interrupt's IRQL is higher than the current one */
             if (Interrupt->SynchronizeIrql > Interrupt->Irql)
             {
@@ -270,23 +270,23 @@ KiChainedDispatch(IN PKTRAP_FRAME TrapFrame,
                 ASSERT(OldInterruptIrql == Interrupt->Irql);
                 KfLowerIrql(OldInterruptIrql);
             }
                 ASSERT(OldInterruptIrql == Interrupt->Irql);
                 KfLowerIrql(OldInterruptIrql);
             }
-        
+
             /* Check if the interrupt got handled and it's level */
             if ((Handled) && (Interrupt->Mode == LevelSensitive)) break;
             /* Check if the interrupt got handled and it's level */
             if ((Handled) && (Interrupt->Mode == LevelSensitive)) break;
-            
+
             /* What's next? */
             NextEntry = NextEntry->Flink;
             /* What's next? */
             NextEntry = NextEntry->Flink;
-                
+
             /* Is this the last one? */
             if (NextEntry == ListHead)
             {
                 /* Level should not have gotten here */
                 if (Interrupt->Mode == LevelSensitive) break;
             /* Is this the last one? */
             if (NextEntry == ListHead)
             {
                 /* Level should not have gotten here */
                 if (Interrupt->Mode == LevelSensitive) break;
-                
+
                 /* As for edge, we can only exit once nobody can handle the interrupt */
                 if (!Handled) break;
             }
                 /* As for edge, we can only exit once nobody can handle the interrupt */
                 if (!Handled) break;
             }
-            
+
             /* Get the interrupt object for the next pass */
             Interrupt = CONTAINING_RECORD(NextEntry, KINTERRUPT, InterruptListEntry);
         }
             /* Get the interrupt object for the next pass */
             Interrupt = CONTAINING_RECORD(NextEntry, KINTERRUPT, InterruptListEntry);
         }
@@ -575,22 +575,22 @@ KeSynchronizeExecution(IN OUT PKINTERRUPT Interrupt,
 {
     BOOLEAN Success;
     KIRQL OldIrql;
 {
     BOOLEAN Success;
     KIRQL OldIrql;
-    
+
     /* Raise IRQL */
     OldIrql = KfRaiseIrql(Interrupt->SynchronizeIrql);
     /* Raise IRQL */
     OldIrql = KfRaiseIrql(Interrupt->SynchronizeIrql);
-    
+
     /* Acquire interrupt spinlock */
     KeAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
     /* Acquire interrupt spinlock */
     KeAcquireSpinLockAtDpcLevel(Interrupt->ActualLock);
-    
+
     /* Call the routine */
     Success = SynchronizeRoutine(SynchronizeContext);
     /* Call the routine */
     Success = SynchronizeRoutine(SynchronizeContext);
-    
+
     /* Release lock */
     KeReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
     /* Release lock */
     KeReleaseSpinLockFromDpcLevel(Interrupt->ActualLock);
-    
+
     /* Lower IRQL */
     KfLowerIrql(OldIrql);
     /* Lower IRQL */
     KfLowerIrql(OldIrql);
-    
+
     /* Return status */
     return Success;
 }
     /* Return status */
     return Success;
 }