Fix horrible bug where Queued Threads were treated like Threads on the Ready list. I was aware of this bug for months and it's fixed in my new scheduler but now that tinus has seen it happen, I'm comitting the fix temporarly in trunk.

svn path=/trunk/; revision=14966
This commit is contained in:
Alex Ionescu 2005-05-03 23:24:26 +00:00
parent 151078eab1
commit 985abe1494

View file

@ -54,7 +54,7 @@ KiInsertIntoThreadList(KPRIORITY Priority,
KEBUGCHECK(0);
}
InsertTailList(&PriorityListHead[Priority], &Thread->QueueListEntry);
InsertTailList(&PriorityListHead[Priority], &Thread->WaitListEntry);
PriorityListMask |= (1 << Priority);
}
@ -63,7 +63,7 @@ VOID
KiRemoveFromThreadList(PKTHREAD Thread)
{
ASSERT(Ready == Thread->State);
RemoveEntryList(&Thread->QueueListEntry);
RemoveEntryList(&Thread->WaitListEntry);
if (IsListEmpty(&PriorityListHead[(ULONG)Thread->Priority])) {
PriorityListMask &= ~(1 << Thread->Priority);
@ -87,7 +87,7 @@ KiScanThreadList(KPRIORITY Priority,
while (current_entry != &PriorityListHead[Priority]) {
current = CONTAINING_RECORD(current_entry, KTHREAD, QueueListEntry);
current = CONTAINING_RECORD(current_entry, KTHREAD, WaitListEntry);
if (current->State != Ready) {