mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
If the user mode is intercepted by an interrupt, we must deliver user mode apc's.
svn path=/trunk/; revision=16627
This commit is contained in:
parent
2adf26048d
commit
53f97f1bee
1 changed files with 11 additions and 5 deletions
|
@ -306,12 +306,12 @@ KiInterruptDispatch (ULONG vector, PKIRQ_TRAPFRAME Trapframe)
|
|||
*/
|
||||
Ke386DisableInterrupts();
|
||||
|
||||
HalEndSystemInterrupt (old_level, 0);
|
||||
|
||||
if (old_level==PASSIVE_LEVEL && Trapframe->Cs != KERNEL_CS)
|
||||
{
|
||||
HalEndSystemInterrupt (APC_LEVEL, 0);
|
||||
|
||||
CurrentThread = KeGetCurrentThread();
|
||||
if (CurrentThread!=NULL && CurrentThread->Alerted[1])
|
||||
if (CurrentThread!=NULL && CurrentThread->ApcState.UserApcPending)
|
||||
{
|
||||
DPRINT("PID: %d, TID: %d CS %04x/%04x\n",
|
||||
((PETHREAD)CurrentThread)->ThreadsProcess->UniqueProcessId,
|
||||
|
@ -325,8 +325,8 @@ KiInterruptDispatch (ULONG vector, PKIRQ_TRAPFRAME Trapframe)
|
|||
CurrentThread->TrapFrame = &KernelTrapFrame;
|
||||
}
|
||||
|
||||
Ke386EnableInterrupts();
|
||||
KiDeliverApc(KernelMode, NULL, NULL);
|
||||
Ke386EnableInterrupts();
|
||||
KiDeliverApc(UserMode, NULL, NULL);
|
||||
Ke386DisableInterrupts();
|
||||
|
||||
ASSERT(KeGetCurrentThread() == CurrentThread);
|
||||
|
@ -336,7 +336,13 @@ KiInterruptDispatch (ULONG vector, PKIRQ_TRAPFRAME Trapframe)
|
|||
CurrentThread->TrapFrame = OldTrapFrame;
|
||||
}
|
||||
}
|
||||
KeLowerIrql(PASSIVE_LEVEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
HalEndSystemInterrupt (old_level, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static VOID
|
||||
|
|
Loading…
Reference in a new issue