From 3e3a661612c8296ecbe74b7f3b09965dacbb7ff9 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 28 Mar 2001 03:06:10 +0000 Subject: Switch from save/disable/restore_intr() to critical_enter/exit(). --- sys/kern/subr_prof.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/kern/subr_prof.c') diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index 5277a58..ce71fb6 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -92,7 +92,7 @@ kmstartup(dummy) int nullfunc_loop_overhead; int nullfunc_loop_profiled_time; uintfptr_t tmp_addr; - int intrstate; + critical_t savecrit; #endif /* @@ -135,8 +135,7 @@ kmstartup(dummy) * Disable interrupts to avoid interference while we calibrate * things. */ - intrstate = save_intr(); - disable_intr(); + savecrit = critical_enter(); /* * Determine overheads. @@ -190,7 +189,7 @@ kmstartup(dummy) p->state = GMON_PROF_OFF; stopguprof(p); - restore_intr(intrstate); + critical_exit(savecrit); nullfunc_loop_profiled_time = 0; for (tmp_addr = (uintfptr_t)nullfunc_loop_profiled; -- cgit v1.1