summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prof.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-24 11:11:35 +0000
committerjhb <jhb@FreeBSD.org>2001-01-24 11:11:35 +0000
commitd5d162ffe9e32bb9a567e50bfe6b5051f572af0c (patch)
tree585d2079d40cd1798d8ce5cd6bad6a8578ab2ba6 /sys/kern/subr_prof.c
parentc0f4ac74f20c15d38e4df0281e29a260bf7b1cb5 (diff)
downloadFreeBSD-src-d5d162ffe9e32bb9a567e50bfe6b5051f572af0c.zip
FreeBSD-src-d5d162ffe9e32bb9a567e50bfe6b5051f572af0c.tar.gz
- Catch up to proc flag changes.
Diffstat (limited to 'sys/kern/subr_prof.c')
-rw-r--r--sys/kern/subr_prof.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index 3da2a05..7225c54 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -443,9 +443,13 @@ addupc_task(p, pc, ticks)
register u_int i;
u_short v;
- /* Testing P_PROFIL may be unnecessary, but is certainly safe. */
- if ((p->p_flag & P_PROFIL) == 0 || ticks == 0)
+ /* Testing PS_PROFIL may be unnecessary, but is certainly safe. */
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if ((p->p_sflag & PS_PROFIL) == 0 || ticks == 0) {
+ mtx_exit(&sched_lock, MTX_SPIN);
return;
+ }
+ mtx_exit(&sched_lock, MTX_SPIN);
prof = &p->p_stats->p_prof;
if (pc < prof->pr_off ||
OpenPOWER on IntegriCloud