From 5b7fe4e1d229a131d8f1e6a9e462867709eae75b Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 31 Jul 2005 09:48:12 +0000 Subject: [PATCH] Revert #16904 and clarify the comment about the race condition. svn path=/trunk/; revision=16917 --- reactos/ntoskrnl/ke/clock.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/reactos/ntoskrnl/ke/clock.c b/reactos/ntoskrnl/ke/clock.c index 7ed3abb78a7..885aa596652 100644 --- a/reactos/ntoskrnl/ke/clock.c +++ b/reactos/ntoskrnl/ke/clock.c @@ -305,17 +305,15 @@ KeUpdateRunTime( /* FIXME: Do DPC rate adjustments */ - /* - * RACE CONDITION WARNING. If one stays at DISPATCH_LEVEL for a long - * time the DPC routine which checks for quantum end will not be executed - * and decrementing the quantum here would result in overflow. - */ - if (CurrentThread->Quantum < 0) - return; - /* * If we're at end of quantum request software interrupt. The rest * is handled in KiDispatchInterrupt. + * + * NOTE: If one stays at DISPATCH_LEVEL for a long time the DPC routine + * which checks for quantum end will not be executed and decrementing + * the quantum here can result in overflow. This is not a problem since + * we don't care about the quantum value anymore after the QuantumEnd + * flag is set. */ if ((CurrentThread->Quantum -= 3) <= 0) {