diff options
author | jasone <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-09-07 01:33:02 +0000 |
commit | 769e0f974d8929599ba599ac496510fffc90ff34 (patch) | |
tree | 9387522900085835de81e7830e570ef3f6b3ea80 /sys/kern/subr_prof.c | |
parent | acf1927de02afda4855ec278b1128fd9446405ea (diff) | |
download | FreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.zip FreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.tar.gz |
Major update to the way synchronization is done in the kernel. Highlights
include:
* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The
alpha port is still in transition and currently uses both.)
* Per-CPU idle processes.
* Interrupts are run in their own separate kernel threads and can be
preempted (i386 only).
Partially contributed by: BSDi (BSD/OS)
Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Diffstat (limited to 'sys/kern/subr_prof.c')
-rw-r--r-- | sys/kern/subr_prof.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index 4fa5223..294c649 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -93,6 +93,7 @@ kmstartup(dummy) int nullfunc_loop_profiled_time; uintfptr_t tmp_addr; #endif + int intrstate; /* * Round lowpc and highpc to multiples of the density we're using @@ -135,6 +136,7 @@ kmstartup(dummy) * Disable interrupts to avoid interference while we calibrate * things. */ + intrstate = save_intr(); disable_intr(); /* @@ -189,7 +191,7 @@ kmstartup(dummy) p->state = GMON_PROF_OFF; stopguprof(p); - enable_intr(); + restore_intr(intrstate); nullfunc_loop_profiled_time = 0; for (tmp_addr = (uintfptr_t)nullfunc_loop_profiled; |