diff options
author | jhb <jhb@FreeBSD.org> | 2003-04-22 20:54:04 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-04-22 20:54:04 +0000 |
commit | 128ae3c8d893885f814d7838d0d6b55e38ebd5a9 (patch) | |
tree | cf9f5e574a03e5a0a6e073bd5c35240d1b0b33b5 /sys/kern/kern_fork.c | |
parent | 41837c0a1432e00773a9f7e1c844133dc3f62fc2 (diff) | |
download | FreeBSD-src-128ae3c8d893885f814d7838d0d6b55e38ebd5a9.zip FreeBSD-src-128ae3c8d893885f814d7838d0d6b55e38ebd5a9.tar.gz |
- Move PS_PROFIL and its new cousin PS_STOPPROF back over to p_flag and
rename them appropriately. Protect both flags with both the proc lock
and the sched_lock.
- Protect p_profthreads with the proc lock.
- Remove Giant from profil(2).
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 6be5da9..3dc5f2b 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -483,10 +483,10 @@ again: * The p_stats and p_sigacts substructs are set in vm_forkproc. */ p2->p_flag = 0; + if (p1->p_flag & P_PROFIL) + startprofclock(p2); mtx_lock_spin(&sched_lock); p2->p_sflag = PS_INMEM; - if (p1->p_sflag & PS_PROFIL) - startprofclock(p2); /* * Allow the scheduler to adjust the priority of the child and * parent while we hold the sched_lock. @@ -580,7 +580,7 @@ again: PROC_LOCK(p1); /* - * Preserve some more flags in subprocess. PS_PROFIL has already + * Preserve some more flags in subprocess. P_PROFIL has already * been preserved. */ p2->p_flag |= p1->p_flag & (P_SUGID | P_ALTSTACK); |