summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prof.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_prof.c')
-rw-r--r--sys/kern/subr_prof.c7
1 files changed, 3 insertions, 4 deletions
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;
OpenPOWER on IntegriCloud