- Fixed the wrong check for KMUTEX objects in KeRundownThread.  
- Fixed the endless loop in KeRundownThread.
Modified: trunk/reactos/ntoskrnl/ke/kthread.c

Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c	2005-03-26 17:52:32 UTC (rev 14334)
+++ trunk/reactos/ntoskrnl/ke/kthread.c	2005-03-26 20:14:06 UTC (rev 14335)
@@ -355,12 +355,12 @@
     /* Lock the Dispatcher Database */
     OldIrql = KeAcquireDispatcherDatabaseLock();
 
-    CurrentEntry = Thread->MutantListHead.Flink;
-    while (CurrentEntry != &Thread->MutantListHead) {
+    while (!IsListEmpty(&Thread->MutantListHead)) {
     
         /* Get the Mutant */
+	CurrentEntry = RemoveHeadList(&Thread->MutantListHead);
         Mutant = CONTAINING_RECORD(CurrentEntry, KMUTANT, MutantListEntry);
-        ASSERT(Mutant->ApcDisable);
+        ASSERT(Mutant->ApcDisable == 0);
     
         /* Uncondtionally abandon it */
         DPRINT("Abandonning the Mutant\n");