mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Implement a gatewait case (was "tested" with a "Not yet supported" bug previously in the tree; DPRINT1 is left there for further testing).
- Fix a bug in KeRemoveQueueApc: the code was always removing the first entry in the APC queue instead of the actual APC. This should fix weird user-mode timer bugs. (Spotted in bug 3354). See issue #3354 for more details. svn path=/trunk/; revision=34167
This commit is contained in:
parent
f75f7a44c4
commit
0c8aa0ca08
1 changed files with 19 additions and 4 deletions
|
@ -212,9 +212,24 @@ Unwait:
|
||||||
}
|
}
|
||||||
else if (Thread->State == GateWait)
|
else if (Thread->State == GateWait)
|
||||||
{
|
{
|
||||||
/* We were in a gate wait. FIXME: Handle this */
|
/* We were in a gate wait. Handle this. */
|
||||||
DPRINT1("Not yet supported -- Report this to Alex\n");
|
DPRINT1("A thread was in a gate wait\n");
|
||||||
while (TRUE);
|
|
||||||
|
/* Lock the gate */
|
||||||
|
KiAcquireDispatcherObject(&Thread->GateObject->Header);
|
||||||
|
|
||||||
|
/* Remove it from the waiters list */
|
||||||
|
RemoveEntryList(&Thread->WaitBlock[0].WaitListEntry);
|
||||||
|
|
||||||
|
/* Unlock the gate */
|
||||||
|
KiReleaseDispatcherObject(&Thread->GateObject->Header);
|
||||||
|
|
||||||
|
/* Increase the queue counter if needed */
|
||||||
|
if (Thread->Queue) Thread->Queue->CurrentCount++;
|
||||||
|
|
||||||
|
/* Put into deferred ready list with this status */
|
||||||
|
Status = STATUS_KERNEL_APC;
|
||||||
|
KiInsertDeferredReadyList(Thread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((Thread->State == Waiting) &&
|
else if ((Thread->State == Waiting) &&
|
||||||
|
@ -867,7 +882,7 @@ KeRemoveQueueApc(IN PKAPC Apc)
|
||||||
|
|
||||||
/* Acquire the dispatcher lock and remove it from the list */
|
/* Acquire the dispatcher lock and remove it from the list */
|
||||||
KiAcquireDispatcherLockAtDpcLevel();
|
KiAcquireDispatcherLockAtDpcLevel();
|
||||||
if (RemoveEntryList(&ApcState->ApcListHead[Apc->ApcMode]))
|
if (RemoveEntryList(&Apc->ApcListEntry))
|
||||||
{
|
{
|
||||||
/* Set the correct state based on the APC Mode */
|
/* Set the correct state based on the APC Mode */
|
||||||
if (Apc->ApcMode == KernelMode)
|
if (Apc->ApcMode == KernelMode)
|
||||||
|
|
Loading…
Reference in a new issue