[NTOSKRNL]

- Assert against waiting at DISPATCH_LEVEL

svn path=/trunk/; revision=56747
This commit is contained in:
Thomas Faber 2012-06-19 08:24:32 +00:00
parent 8479f39975
commit e3eb92dddf

View file

@ -417,6 +417,10 @@ KeWaitForSingleObject(IN PVOID Object,
PLARGE_INTEGER OriginalDueTime = Timeout;
ULONG Hand = 0;
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL ||
(KeGetCurrentIrql() == DISPATCH_LEVEL &&
Timeout && Timeout->QuadPart == 0));
/* Check if the lock is already held */
if (!Thread->WaitNext) goto WaitStart;
@ -583,6 +587,10 @@ KeWaitForMultipleObjects(IN ULONG Count,
LARGE_INTEGER DueTime = {{0}}, NewDueTime, InterruptTime;
ULONG Index, Hand = 0;
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL ||
(KeGetCurrentIrql() == DISPATCH_LEVEL &&
Timeout && Timeout->QuadPart == 0));
/* Make sure the Wait Count is valid */
if (!WaitBlockArray)
{