diff options
| author | Warner Losh <imp@FreeBSD.org> | 2002-03-21 06:11:09 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2002-03-21 06:11:09 +0000 |
| commit | cb9a238a8a1b33f526768a7b20b4d0af4a9cd0df (patch) | |
| tree | ff379b13f17033287e3e652d58197853ae047487 /sys | |
| parent | aaf24e105dde1ba5e00a62302bbf630a763479b7 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/subr_trap.c | 10 | ||||
| -rw-r--r-- | sys/kern/subr_witness.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index ebd807e3b363..6fdb9c3ed56a 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(). */ } diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 0857b8e5a74a..9c0005d07f34 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -775,7 +775,7 @@ witness_unlock(struct lock_object *lock, int flags, const char *file, int line) struct lock_instance *instance; struct lock_class *class; struct thread *td; - critical_t s; + register_t s; int i, j; if (witness_cold || witness_dead || lock->lo_witness == NULL || @@ -825,7 +825,7 @@ witness_unlock(struct lock_object *lock, int flags, const char *file, int line) instance->li_flags--; return; } - s = cpu_critical_enter(); + s = intr_disable(); CTR4(KTR_WITNESS, "%s: pid %d removed %s from lle[%d]", __func__, td->td_proc->p_pid, @@ -835,7 +835,7 @@ witness_unlock(struct lock_object *lock, int flags, const char *file, int line) for (j = i; j < (*lock_list)->ll_count; j++) (*lock_list)->ll_children[j] = (*lock_list)->ll_children[j + 1]; - cpu_critical_exit(s); + intr_restore(s); if ((*lock_list)->ll_count == 0) { lle = *lock_list; *lock_list = lle->ll_next; |
