Fixed [Ke/Nt]WaitForMultipleObjects() bug

svn path=/trunk/; revision=1239
This commit is contained in:
Phillip Susi 2000-07-07 00:46:35 +00:00
parent db1ccdf290
commit 3ca24a2c2a

View file

@ -496,7 +496,12 @@ KeWaitForMultipleObjects (
}
blk = WaitBlockArray;
}
if (Timeout != NULL)
{
KeAddThreadTimeout(CurrentThread,Timeout);
}
do {
KeAcquireDispatcherDatabaseLock(FALSE);
for (i = 0; i < Count; i++)
@ -525,11 +530,6 @@ KeWaitForMultipleObjects (
return(STATUS_WAIT_0);
}
if (Timeout != NULL)
{
KeAddThreadTimeout(CurrentThread,Timeout);
}
/* Append wait block to the KTHREAD wait block list */
CurrentThread->WaitBlockList = blk;
@ -550,8 +550,8 @@ KeWaitForMultipleObjects (
DPRINT("blk %p blk->NextWaitBlock %p\n",
blk, blk->NextWaitBlock);
InsertTailList(&(hdr->WaitListHead),&(blk->WaitListEntry));
// DPRINT("hdr->WaitListHead.Flink %x hdr->WaitListHead.Blink %x\n",
// hdr->WaitListHead.Flink,hdr->WaitListHead.Blink);
// DPRINT("hdr->WaitListHead.Flink %x hdr->WaitListHead.Blink %x\n",
// hdr->WaitListHead.Flink,hdr->WaitListHead.Blink);
blk = blk->NextWaitBlock;
}
@ -564,7 +564,7 @@ KeWaitForMultipleObjects (
&Status,
Alertable,
WaitMode);
} while( Status == STATUS_KERNEL_APC );
if (Timeout != NULL)
KeCancelTimer(&KeGetCurrentThread()->Timer);
DPRINT("Returning from KeWaitForMultipleObjects()\n");