summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs/procfs_ctl.c')
-rw-r--r--sys/fs/procfs/procfs_ctl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c
index d11a296..78d4ac2 100644
--- a/sys/fs/procfs/procfs_ctl.c
+++ b/sys/fs/procfs/procfs_ctl.c
@@ -36,7 +36,7 @@
*
* @(#)procfs_ctl.c 8.3 (Berkeley) 1/21/94
*
- * $Id: procfs_ctl.c,v 1.7 1995/12/03 14:54:34 bde Exp $
+ * $Id: procfs_ctl.c,v 1.8 1995/12/07 12:47:14 davidg Exp $
*/
#include <sys/param.h>
@@ -72,8 +72,6 @@
procfs_fix_sstep(p); \
} \
}
-#else
-#define FIX_SSTEP(p)
#endif
#define PROCFS_CTL_ATTACH 1
@@ -171,10 +169,13 @@ procfs_control(curp, p, op)
return (EBUSY);
}
+
+#ifdef FIX_SSTEP
/*
* do single-step fixup if needed
*/
FIX_SSTEP(p);
+#endif
/*
* Don't deliver any signal by default.
@@ -218,7 +219,9 @@ procfs_control(curp, p, op)
* Step. Let the target process execute a single instruction.
*/
case PROCFS_CTL_STEP:
+ PHOLD(p);
procfs_sstep(p);
+ PRELE(p);
break;
/*
@@ -301,7 +304,9 @@ procfs_doctl(curp, p, pfs, uio)
if (nm) {
if (TRACE_WAIT_P(curp, p)) {
p->p_xstat = nm->nm_val;
+#ifdef FIX_SSTEP
FIX_SSTEP(p);
+#endif
setrunnable(p);
} else {
psignal(p, nm->nm_val);
OpenPOWER on IntegriCloud