Author: tfaber
Date: Sun Mar 30 21:10:04 2014
New Revision: 62590
URL:
http://svn.reactos.org/svn/reactos?rev=62590&view=rev
Log:
[NTOS:KE]
- Verify valid IRQL in KeDelayExecutionThread, just like in KeWait*
- Return from KeDelayExecutionThread after yielding execution
Modified:
trunk/reactos/ntoskrnl/ke/wait.c
Modified: trunk/reactos/ntoskrnl/ke/wait.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/wait.c?rev=625…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/wait.c [iso-8859-1] Sun Mar 30 21:10:04 2014
@@ -285,6 +285,11 @@
LARGE_INTEGER DueTime, NewDueTime, InterruptTime;
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 (!(Interval->QuadPart) && (WaitMode != KernelMode))
{
@@ -292,7 +297,7 @@
if (!(Alertable) && !(Thread->ApcState.UserApcPending))
{
/* Yield execution */
- NtYieldExecution();
+ return NtYieldExecution();
}
}