From bd99ddf7afea4a7e6f49ea30ad84f7491e5eb809 Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Sat, 20 Apr 2002 03:21:35 +0000 Subject: [PATCH] KiInterruptDispatch was leaving interrupts disabled when dropping to PASSIVE_LEVEL to run the idle thread I'm not quite sure I have it reenable interrupts at a safe place, but at least it does enable them svn path=/trunk/; revision=2860 --- reactos/ntoskrnl/ke/i386/irq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/ke/i386/irq.c b/reactos/ntoskrnl/ke/i386/irq.c index 042ea85e5b1..6da2230ec02 100644 --- a/reactos/ntoskrnl/ke/i386/irq.c +++ b/reactos/ntoskrnl/ke/i386/irq.c @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.17 2002/02/15 14:47:04 ekohl Exp $ +/* $Id: irq.c,v 1.18 2002/04/20 03:21:35 phreak Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -344,11 +344,13 @@ KiInterruptDispatch (ULONG Vector, PKIRQ_TRAPFRAME Trapframe) * If the processor level will drop below dispatch level on return then * issue a DPC queue drain interrupt */ + + __asm__("sti\n\t"); + if (old_level < DISPATCH_LEVEL) { HalEndSystemInterrupt (DISPATCH_LEVEL, 0); - __asm__("sti\n\t"); if (KeGetCurrentThread() != NULL) { @@ -439,10 +441,11 @@ KiInterruptDispatch (ULONG irq, PKIRQ_TRAPFRAME Trapframe) * If the processor level will drop below dispatch level on return then * issue a DPC queue drain interrupt */ + __asm__("sti\n\t"); + if (old_level < DISPATCH_LEVEL) { HalEndSystemInterrupt (DISPATCH_LEVEL, 0); - __asm__("sti\n\t"); if (KeGetCurrentThread() != NULL) {