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_witness.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_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 0857b8e..9c0005d 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; |