diff options
author | imp <imp@FreeBSD.org> | 2002-03-21 06:11:09 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-03-21 06:11:09 +0000 |
commit | 969e82886e098e382b42829fd7467bc23ebe02d7 (patch) | |
tree | ff379b13f17033287e3e652d58197853ae047487 /sys/kern/subr_trap.c | |
parent | 20c7c9d94e981730b6cec780b34db5513db9e688 (diff) | |
download | FreeBSD-src-969e82886e098e382b42829fd7467bc23ebe02d7.zip FreeBSD-src-969e82886e098e382b42829fd7467bc23ebe02d7.tar.gz |
Remove last two abuses of cpu_critical_{enter,exit} in the MI code.
Reviewed by: jake, jhb, rwatson
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index ebd807e..6fdb9c3 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -123,7 +123,7 @@ ast(framep) struct proc *p = td->td_proc; struct kse *ke = td->td_kse; u_int prticks, sticks; - critical_t s; + register_t s; int sflag; int flags; #if defined(DEV_NPX) && !defined(SMP) @@ -137,9 +137,9 @@ ast(framep) #endif mtx_assert(&Giant, MA_NOTOWNED); prticks = 0; /* XXX: Quiet warning. */ - s = cpu_critical_enter(); + s = intr_disable(); while ((ke->ke_flags & (KEF_ASTPENDING | KEF_NEEDRESCHED)) != 0) { - cpu_critical_exit(s); + intr_restore(s); td->td_frame = framep; /* * This updates the p_sflag's for the checks below in one @@ -190,13 +190,13 @@ ast(framep) #ifdef DIAGNOSTIC cred_free_thread(td); #endif - s = cpu_critical_enter(); + s = intr_disable(); } mtx_assert(&Giant, MA_NOTOWNED); /* * We need to keep interrupts disabled so that if any further AST's * come in, the interrupt they come in on will be delayed until we * finish returning to userland. We assume that the return to userland - * will perform the equivalent of cpu_critical_exit(). + * will perform the equivalent of intr_restore(). */ } |