summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prof.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-28 03:06:10 +0000
committerjhb <jhb@FreeBSD.org>2001-03-28 03:06:10 +0000
commit3e3a661612c8296ecbe74b7f3b09965dacbb7ff9 (patch)
tree31bcf682861c81d34d0528babee47b8a1d4c44ba /sys/kern/subr_prof.c
parentdea228e37800fc07cb4619f31e155310a4bad233 (diff)
downloadFreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.zip
FreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.tar.gz
Switch from save/disable/restore_intr() to critical_enter/exit().
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