don't remove mutants twice from the thread's mutant list in KeRundownThread(). This might fix bug 821
Modified: trunk/reactos/ntoskrnl/ke/kthread.c

Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c	2005-09-30 21:32:01 UTC (rev 18178)
+++ trunk/reactos/ntoskrnl/ke/kthread.c	2005-09-30 22:00:30 UTC (rev 18179)
@@ -467,7 +467,7 @@
     while (!IsListEmpty(&Thread->MutantListHead)) {
 
         /* Get the Mutant */
-	CurrentEntry = RemoveHeadList(&Thread->MutantListHead);
+        CurrentEntry = RemoveHeadList(&Thread->MutantListHead);
         Mutant = CONTAINING_RECORD(CurrentEntry, KMUTANT, MutantListEntry);
         ASSERT(Mutant->ApcDisable == 0);
 
@@ -476,7 +476,6 @@
         Mutant->Header.SignalState = 1;
         Mutant->Abandoned = TRUE;
         Mutant->OwnerThread = NULL;
-        RemoveEntryList(&Mutant->MutantListEntry);
 
         /* Check if the Wait List isn't empty */
         DPRINT("Checking whether to wake the Mutant\n");