diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-05-25 19:07:14 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-05-25 19:07:14 +0000 |
commit | ee39d85579ccda9898973da55a03fe13224a6949 (patch) | |
tree | 19c9708d6ce104d4e15df46bd0f21d273380ec0a /sys/arch/i386 | |
parent | f99a544f6dd5e010dc5b54efb186d94a0ed6d6dc (diff) |
repair whichqs race by disabling ints in between check and halt-halt; marco@ beck@ niklas@ ok
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 5 |
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 |