[CMAKE]
[reactos.git] / ntoskrnl / ke / wait.c
index 2e9c1c8..3fc5106 100644 (file)
@@ -87,7 +87,7 @@ KiUnlinkThread(IN PKTHREAD Thread,
 VOID
 FASTCALL
 KiUnwaitThread(IN PKTHREAD Thread,
-               IN NTSTATUS WaitStatus,
+               IN LONG_PTR WaitStatus,
                IN KPRIORITY Increment)
 {
     /* Unlink the thread */
@@ -110,7 +110,7 @@ KiAcquireFastMutex(IN PFAST_MUTEX FastMutex)
     FastMutex->Contention++;
 
     /* Wait for the event */
-    KeWaitForSingleObject(&FastMutex->Gate,
+    KeWaitForSingleObject(&FastMutex->Event,
                           WrMutex,
                           KernelMode,
                           FALSE,
@@ -249,7 +249,7 @@ KiExitDispatcher(IN KIRQL OldIrql)
     Thread->WaitIrql = OldIrql;
 
     /* Swap threads and check if APCs were pending */
-    PendingApc = KiSwapContext(Thread, NextThread);
+    PendingApc = KiSwapContext(OldIrql, Thread);
     if (PendingApc)
     {
         /* Lower only to APC */