summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-08-10 23:00:07 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-08-10 23:00:07 +0000
commit0f345c4054c13dfe741f6c23f057c62a6359370f (patch)
tree2c126aa8065a99016cdde9f028ddbdfec638a7a7 /sys
parent688ebe120c47c9478446c12022b5e4667c2bff7a (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/isa/ipl.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s
index b28837e45bb9..d429f5ad13ae 100644
--- a/sys/i386/isa/ipl.s
+++ b/sys/i386/isa/ipl.s
@@ -66,6 +66,16 @@ doreti_next:
je doreti_exit /* no, defer */
doreti_ast:
+ /*
+ * Check for ASTs atomically with returning. Disabling CPU
+ * interrupts provides sufficient locking evein the SMP case,
+ * since we will be informed of any new ASTs by an IPI.
+ */
+ cli
+ movl PCPU(CURPROC),%eax
+ testl $PS_ASTPENDING | PS_NEEDRESCHED,P_SFLAG(%eax)
+ je doreti_exit
+ sti
pushl %esp /* pass a pointer to the trapframe */
call ast
add $4,%esp