summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-05-25 19:07:14 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-05-25 19:07:14 +0000
commitee39d85579ccda9898973da55a03fe13224a6949 (patch)
tree19c9708d6ce104d4e15df46bd0f21d273380ec0a /sys/arch
parentf99a544f6dd5e010dc5b54efb186d94a0ed6d6dc (diff)
repair whichqs race by disabling ints in between check and halt-halt; marco@ beck@ niklas@ ok
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/locore.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index 2a37bc7f836..1d6f0cc39c3 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.85 2005/05/24 19:37:08 niklas Exp $ */
+/* $OpenBSD: locore.s,v 1.86 2005/05/25 19:07:13 mickey Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1599,6 +1599,7 @@ ENTRY(idle)
movl $IPL_NONE,CPL # spl0()
call _C_LABEL(Xspllower) # process pending interrupts
+ cli
cmpl $0,_C_LABEL(whichqs)
jnz _C_LABEL(idle_exit)
@@ -1613,11 +1614,13 @@ ENTRY(idle_loop)
sti
hlt
#endif
+ cli
cmpl $0,_C_LABEL(whichqs)
jz _C_LABEL(idle_loop)
ENTRY(idle_exit)
movl $IPL_HIGH,CPL # splhigh
+ sti
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
call _C_LABEL(sched_lock_idle)
#endif