mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:33:10 +00:00
Fix a race condition in quantum code. Spotted by Shmuel Baron.
svn path=/trunk/; revision=16904
This commit is contained in:
parent
46be8912e3
commit
34674d7646
1 changed files with 10 additions and 2 deletions
|
@ -305,6 +305,14 @@ KeUpdateRunTime(
|
||||||
|
|
||||||
/* FIXME: Do DPC rate adjustments */
|
/* 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
|
* If we're at end of quantum request software interrupt. The rest
|
||||||
* is handled in KiDispatchInterrupt.
|
* is handled in KiDispatchInterrupt.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue