VOID
FASTCALL
KiUnwaitThread(IN PKTHREAD Thread,
- IN NTSTATUS WaitStatus,
+ IN LONG_PTR WaitStatus,
IN KPRIORITY Increment)
{
/* Unlink the thread */
FastMutex->Contention++;
/* Wait for the event */
- KeWaitForSingleObject(&FastMutex->Gate,
+ KeWaitForSingleObject(&FastMutex->Event,
WrMutex,
KernelMode,
FALSE,
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 */