mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 18:00:41 +00:00
[NTOS:KE]
- Verify valid IRQL in KeDelayExecutionThread, just like in KeWait* - Return from KeDelayExecutionThread after yielding execution svn path=/trunk/; revision=62590
This commit is contained in:
parent
b6aa0990cd
commit
ba3759fb6b
1 changed files with 6 additions and 1 deletions
|
@ -285,6 +285,11 @@ KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode,
|
||||||
LARGE_INTEGER DueTime, NewDueTime, InterruptTime;
|
LARGE_INTEGER DueTime, NewDueTime, InterruptTime;
|
||||||
ULONG Hand = 0;
|
ULONG Hand = 0;
|
||||||
|
|
||||||
|
if (Thread->WaitNext)
|
||||||
|
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
|
||||||
|
else
|
||||||
|
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
|
||||||
|
|
||||||
/* If this is a user-mode wait of 0 seconds, yield execution */
|
/* If this is a user-mode wait of 0 seconds, yield execution */
|
||||||
if (!(Interval->QuadPart) && (WaitMode != KernelMode))
|
if (!(Interval->QuadPart) && (WaitMode != KernelMode))
|
||||||
{
|
{
|
||||||
|
@ -292,7 +297,7 @@ KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode,
|
||||||
if (!(Alertable) && !(Thread->ApcState.UserApcPending))
|
if (!(Alertable) && !(Thread->ApcState.UserApcPending))
|
||||||
{
|
{
|
||||||
/* Yield execution */
|
/* Yield execution */
|
||||||
NtYieldExecution();
|
return NtYieldExecution();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue