mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:12:55 +00:00
- something was wrong with the previous checkin.
svn path=/trunk/; revision=4914
This commit is contained in:
parent
1d64761f02
commit
df3bf6cc39
1 changed files with 4 additions and 5 deletions
|
@ -91,14 +91,13 @@ KiDeliverNormalApc(VOID)
|
||||||
KeAcquireSpinLock(&PiApcLock, &oldlvl);
|
KeAcquireSpinLock(&PiApcLock, &oldlvl);
|
||||||
while(!IsListEmpty(&(Thread->Tcb.ApcState.ApcListHead[0])))
|
while(!IsListEmpty(&(Thread->Tcb.ApcState.ApcListHead[0])))
|
||||||
{
|
{
|
||||||
current = Thread->Tcb.ApcState.ApcListHead[0].Blink;
|
current = RemoveTailList(&Thread->Tcb.ApcState.ApcListHead[0]);
|
||||||
Apc = CONTAINING_RECORD(current, KAPC, ApcListEntry);
|
Apc = CONTAINING_RECORD(current, KAPC, ApcListEntry);
|
||||||
if (Apc->NormalRoutine == NULL)
|
if (Apc->NormalRoutine == NULL)
|
||||||
{
|
{
|
||||||
DbgPrint("Exiting kernel with kernel APCs pending.\n");
|
DbgPrint("Exiting kernel with kernel APCs pending.\n");
|
||||||
KeBugCheck(0);
|
KeBugCheck(0);
|
||||||
}
|
}
|
||||||
(VOID)RemoveTailList(&Thread->Tcb.ApcState.ApcListHead[0]);
|
|
||||||
Apc->Inserted = FALSE;
|
Apc->Inserted = FALSE;
|
||||||
Thread->Tcb.ApcState.KernelApcInProgress++;
|
Thread->Tcb.ApcState.KernelApcInProgress++;
|
||||||
Thread->Tcb.ApcState.KernelApcPending--;
|
Thread->Tcb.ApcState.KernelApcPending--;
|
||||||
|
@ -263,7 +262,6 @@ KiDeliverApc(ULONG Unknown1,
|
||||||
Apc = CONTAINING_RECORD(current_entry, KAPC, ApcListEntry);
|
Apc = CONTAINING_RECORD(current_entry, KAPC, ApcListEntry);
|
||||||
if (Apc->NormalRoutine == NULL)
|
if (Apc->NormalRoutine == NULL)
|
||||||
{
|
{
|
||||||
current_entry = current_entry->Flink;
|
|
||||||
Apc->Inserted = FALSE;
|
Apc->Inserted = FALSE;
|
||||||
RemoveEntryList(&Apc->ApcListEntry);
|
RemoveEntryList(&Apc->ApcListEntry);
|
||||||
Thread->Tcb.ApcState.KernelApcInProgress++;
|
Thread->Tcb.ApcState.KernelApcInProgress++;
|
||||||
|
@ -279,6 +277,7 @@ KiDeliverApc(ULONG Unknown1,
|
||||||
|
|
||||||
KeAcquireSpinLock(&PiApcLock, &oldlvl);
|
KeAcquireSpinLock(&PiApcLock, &oldlvl);
|
||||||
Thread->Tcb.ApcState.KernelApcInProgress--;
|
Thread->Tcb.ApcState.KernelApcInProgress--;
|
||||||
|
current_entry = Thread->Tcb.ApcState.ApcListHead[0].Flink;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -415,9 +414,9 @@ KeRemoveQueueApc (PKAPC Apc)
|
||||||
{
|
{
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
PKTHREAD TargetThread;
|
PKTHREAD TargetThread;
|
||||||
|
|
||||||
KeAcquireSpinLockAtDpcLevel(&PiApcLock);
|
|
||||||
KeRaiseIrql(HIGH_LEVEL, &oldIrql);
|
KeRaiseIrql(HIGH_LEVEL, &oldIrql);
|
||||||
|
KeAcquireSpinLockAtDpcLevel(&PiApcLock);
|
||||||
if (Apc->Inserted == FALSE)
|
if (Apc->Inserted == FALSE)
|
||||||
{
|
{
|
||||||
KeReleaseSpinLock(&PiApcLock, oldIrql);
|
KeReleaseSpinLock(&PiApcLock, oldIrql);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue