Author: tfaber
Date: Thu Apr 20 17:36:40 2017
New Revision: 74384

URL: http://svn.reactos.org/svn/reactos?rev=74384&view=rev
Log:
[NTOS:KE]
- Reset DebugDpcTime before calling timer DPC routines. Avoids spurious "DPC 
routine > 1 sec" break-ins.

Modified:
    trunk/reactos/ntoskrnl/ke/dpc.c

Modified: trunk/reactos/ntoskrnl/ke/dpc.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/dpc.c?rev=74384&r1=74383&r2=74384&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/dpc.c     [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/dpc.c     [iso-8859-1] Thu Apr 20 17:36:40 2017
@@ -92,9 +92,7 @@
     ULONG Period;
     DPC_QUEUE_ENTRY DpcEntry[MAX_TIMER_DPCS];
     PKSPIN_LOCK_QUEUE LockQueue;
-#ifdef CONFIG_SMP
     PKPRCB Prcb = KeGetCurrentPrcb();
-#endif
 
     /* Disable interrupts */
     _disable();
@@ -227,6 +225,11 @@
                     /* Start looping all DPC Entries */
                     for (i = 0; DpcCalls; DpcCalls--, i++)
                     {
+#if DBG
+                        /* Clear DPC Time */
+                        Prcb->DebugDpcTime = 0;
+#endif
+
                         /* Call the DPC */
                         DpcEntry[i].Routine(DpcEntry[i].Dpc,
                                             DpcEntry[i].Context,
@@ -270,6 +273,11 @@
                     /* Start looping all DPC Entries */
                     for (i = 0; DpcCalls; DpcCalls--, i++)
                     {
+#if DBG
+                        /* Clear DPC Time */
+                        Prcb->DebugDpcTime = 0;
+#endif
+
                         /* Call the DPC */
                         DpcEntry[i].Routine(DpcEntry[i].Dpc,
                                             DpcEntry[i].Context,
@@ -303,6 +311,11 @@
         /* Start looping all DPC Entries */
         for (i = 0; DpcCalls; DpcCalls--, i++)
         {
+#if DBG
+            /* Clear DPC Time */
+            Prcb->DebugDpcTime = 0;
+#endif
+
             /* Call the DPC */
             DpcEntry[i].Routine(DpcEntry[i].Dpc,
                                 DpcEntry[i].Context,
@@ -333,9 +346,7 @@
     PKDPC TimerDpc;
     ULONG Period;
     DPC_QUEUE_ENTRY DpcEntry[MAX_TIMER_DPCS];
-#ifdef CONFIG_SMP
     PKPRCB Prcb = KeGetCurrentPrcb();
-#endif
 
     /* Query system */
     KeQuerySystemTime((PLARGE_INTEGER)&SystemTime);
@@ -427,6 +438,11 @@
         /* Start looping all DPC Entries */
         for (i = 0; DpcCalls; DpcCalls--, i++)
         {
+#if DBG
+            /* Clear DPC Time */
+            Prcb->DebugDpcTime = 0;
+#endif
+
             /* Call the DPC */
             DpcEntry[i].Routine(DpcEntry[i].Dpc,
                                 DpcEntry[i].Context,


Reply via email to