summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-17 22:13:46 +0000
committerjhb <jhb@FreeBSD.org>2003-04-17 22:13:46 +0000
commitd4a3f193d097486ec8da30c49e330f5b5c5b12db (patch)
tree5548a9342569347bc1648d9fe672e8ccc4f390d8 /sys/fs/procfs
parent9d63461efbd6290e8d71969851fad0858ac84a8e (diff)
downloadFreeBSD-src-d4a3f193d097486ec8da30c49e330f5b5c5b12db.zip
FreeBSD-src-d4a3f193d097486ec8da30c49e330f5b5c5b12db.tar.gz
- P_SHOULDSTOP just needs proc lock now, so don't acquire sched_lock unless
it is needed. - Add a proc lock assertion.
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_ioctl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/fs/procfs/procfs_ioctl.c b/sys/fs/procfs/procfs_ioctl.c
index 170a810..3f03767 100644
--- a/sys/fs/procfs/procfs_ioctl.c
+++ b/sys/fs/procfs/procfs_ioctl.c
@@ -92,18 +92,15 @@ procfs_ioctl(PFS_IOCTL_ARGS)
break;
}
#if 0
- mtx_lock_spin(&sched_lock);
p->p_step = 0;
if (P_SHOULDSTOP(p)) {
p->p_xstat = sig;
p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG);
+ mtx_lock_spin(&sched_lock);
thread_unsuspend(p);
mtx_unlock_spin(&sched_lock);
- } else {
- mtx_unlock_spin(&sched_lock);
- if (sig)
- psignal(p, sig);
- }
+ } else if (sig)
+ psignal(p, sig);
#else
if (sig)
psignal(p, sig);
@@ -126,6 +123,7 @@ int
procfs_close(PFS_CLOSE_ARGS)
{
if (p != NULL && (p->p_pfsflags & PF_LINGER) == 0) {
+ PROC_LOCK_ASSERT(p, MA_OWNED);
p->p_pfsflags = 0;
p->p_stops = 0;
p->p_step = 0;
OpenPOWER on IntegriCloud