/* It has a normal signal state, so unwait it and return */
KiSatisfyObjectWait(CurrentObject, CurrentThread);
Status = STATUS_WAIT_0;
- goto WaitDone;
+ goto DontWait;
} else {
/* Return a timeout */
Status = STATUS_TIMEOUT;
- goto WaitDone;
+ goto DontWait;
}
/* Point to Timer Wait Block and Thread Timer */
/* Return a timeout if we couldn't insert the timer for some reason */
Status = STATUS_TIMEOUT;
- goto WaitDone;
+ goto DontWait;
}
}
} while (TRUE);
-WaitDone:
/* Release the Lock, we are done */
DPRINT("Returning from KeWaitForMultipleObjects(), %x. Status: %d\n", KeGetCurrentThread(), Status);
KeReleaseDispatcherDatabaseLock(CurrentThread->WaitIrql);
return Status;
+
+DontWait:
+ /* Adjust the Quantum */
+ KiAdjustQuantumThread(CurrentThread);
+
+ /* Release & Return */
+ DPRINT("Returning from KeWaitForMultipleObjects(), %x. Status: %d\n. We did not wait.", KeGetCurrentThread(), Status);
+ KeReleaseDispatcherDatabaseLock(CurrentThread->WaitIrql);
+ return Status;
}
/*
/* It has a normal signal state, so unwait it and return */
KiSatisfyObjectWait(CurrentObject, CurrentThread);
Status = STATUS_WAIT_0 | WaitIndex;
- goto WaitDone;
+ goto DontWait;
} else {
/* Satisfy their Waits and return to the caller */
KiSatisifyMultipleObjectWaits(WaitBlock);
Status = STATUS_WAIT_0;
- goto WaitDone;
+ goto DontWait;
}
/* Make sure we can satisfy the Alertable request */
/* Return a timeout */
Status = STATUS_TIMEOUT;
- goto WaitDone;
+ goto DontWait;
}
/* Point to Timer Wait Block and Thread Timer */
/* Return a timeout if we couldn't insert the timer for some reason */
Status = STATUS_TIMEOUT;
- goto WaitDone;
+ goto DontWait;
}
}
} while (TRUE);
-WaitDone:
/* Release the Lock, we are done */
DPRINT("Returning from KeWaitForMultipleObjects(), %x. Status: %d\n", KeGetCurrentThread(), Status);
KeReleaseDispatcherDatabaseLock(CurrentThread->WaitIrql);
return Status;
+
+DontWait:
+ /* Adjust the Quantum */
+ KiAdjustQuantumThread(CurrentThread);
+
+ /* Release & Return */
+ DPRINT("Returning from KeWaitForMultipleObjects(), %x. Status: %d\n. We did not wait.", KeGetCurrentThread(), Status);
+ KeReleaseDispatcherDatabaseLock(CurrentThread->WaitIrql);
+ return Status;
}
VOID