Remove the thread from the list when terminating.
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-23 06:45:56 UTC (rev 14762) +++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-23 10:11:37 UTC (rev 14763) @@ -1137,6 +1137,9 @@
/* Lock the Dispatcher Database and the APC Queue */ DPRINT("Terminating\n"); OldIrql = KeAcquireDispatcherDatabaseLock();
+ + /* Remove the thread from the list */ + RemoveEntryList(&Thread->ThreadListEntry);
/* Insert into the Reaper List */ DPRINT("List: %p\n", PspReaperList);