mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
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:
parent
151078eab1
commit
985abe1494
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue