- Invert CONFIG_SMP defines as requested by Hartmut
[reactos.git] / reactos / ntoskrnl / ke / queue.c
index 53d451a..8883a35 100644 (file)
@@ -286,12 +286,16 @@ KeRemoveQueue(IN PKQUEUE Queue,
             InsertTailList(&Queue->Header.WaitListHead,
                            &WaitBlock->WaitListEntry);
 
-            /* Block the Thread */
-            DPRINT("Blocking the Thread: %x %x!\n", KeGetCurrentThread(), Thread);
-            KiBlockThread(&Status,
-                          FALSE,
-                          WaitMode,
-                          WrQueue);
+            /* Setup the wait information */
+            Thread->WaitMode = WaitMode;
+            Thread->WaitReason = WrQueue;
+            Thread->Alertable = FALSE;
+            Thread->WaitTime = 0;
+            Thread->State = Waiting;
+
+            /* Find a new thread to run */
+            DPRINT("Swapping threads\n");
+            Status = KiSwapThread();
 
             /* Reset the wait reason */
             Thread->WaitReason = 0;