[ros-diffs] [navaraf] 16917: Revert #16904 and clarify the comment
about the race condition.
navaraf at svn.reactos.com
navaraf at svn.reactos.com
Sun Jul 31 11:48:16 CEST 2005
Revert #16904 and clarify the comment about the race condition.
Modified: trunk/reactos/ntoskrnl/ke/clock.c
_____
Modified: trunk/reactos/ntoskrnl/ke/clock.c
--- trunk/reactos/ntoskrnl/ke/clock.c 2005-07-31 08:33:39 UTC (rev
16916)
+++ trunk/reactos/ntoskrnl/ke/clock.c 2005-07-31 09:48:12 UTC (rev
16917)
@@ -305,17 +305,15 @@
/* 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)
{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050731/66825363/attachment.html
More information about the Ros-diffs
mailing list