summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/apic_vector.s
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-02-10 02:20:34 +0000
committerjhb <jhb@FreeBSD.org>2001-02-10 02:20:34 +0000
commita9c84e00da6824d43126b1e221e6e6e95cc276c8 (patch)
tree2ffe447aaa792aff3416e8c400ea31e67ab643b7 /sys/i386/isa/apic_vector.s
parentefcbded13731a03d5149d347fa46611d5ff0ffff (diff)
downloadFreeBSD-src-a9c84e00da6824d43126b1e221e6e6e95cc276c8.zip
FreeBSD-src-a9c84e00da6824d43126b1e221e6e6e95cc276c8.tar.gz
- Make astpending and need_resched process attributes rather than CPU
attributes. This is needed for AST's to be properly posted in a preemptive kernel. They are backed by two new flags in p_sflag: PS_ASTPENDING and PS_NEEDRESCHED. They are still accesssed by their old macros: aston(), astoff(), etc. For completeness, an astpending() macro has been added to check for a pending AST, and clear_resched() has been added to clear need_resched(). - Rename syscall2() on the x86 back to syscall() to be consistent with other architectures.
Diffstat (limited to 'sys/i386/isa/apic_vector.s')
-rw-r--r--sys/i386/isa/apic_vector.s9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s
index fbaceff..68b6c77 100644
--- a/sys/i386/isa/apic_vector.s
+++ b/sys/i386/isa/apic_vector.s
@@ -304,10 +304,9 @@ _Xcpuast:
FAKE_MCOUNT(13*4(%esp))
- orl $AST_PENDING, PCPU(ASTPENDING) /* XXX */
+ MTX_LOCK_SPIN(sched_lock, 0)
movl PCPU(CURPROC),%ebx
- incl P_INTR_NESTING_LEVEL(%ebx)
- sti
+ orl $PS_ASTPENDING, P_SFLAG(%ebx)
movl PCPU(CPUID), %eax
lock
@@ -315,13 +314,13 @@ _Xcpuast:
lock
btrl %eax, CNAME(resched_cpus)
jnc 2f
- orl $AST_PENDING+AST_RESCHED, PCPU(ASTPENDING)
+ orl $PS_NEEDRESCHED, P_SFLAG(%ebx)
lock
incl CNAME(want_resched_cnt)
2:
+ MTX_UNLOCK_SPIN(sched_lock)
lock
incl CNAME(cpuast_cnt)
- decl P_INTR_NESTING_LEVEL(%ebx)
MEXITCOUNT
jmp _doreti
1:
OpenPOWER on IntegriCloud