summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sys/proc.h9
-rw-r--r--sys/sys/ptrace.h4
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 49b1b52..c276b87 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)proc.h 8.8 (Berkeley) 1/21/94
- * $Id: proc.h,v 1.17 1995/03/16 18:16:22 bde Exp $
+ * $Id: proc.h,v 1.18 1995/07/13 08:48:03 davidg Exp $
*/
#ifndef _SYS_PROC_H_
@@ -234,6 +234,13 @@ struct pcred {
FREE(s, M_SESSION); \
}
+/* hold process U-area in memory, normally for ptrace/procfs work */
+#define PHOLD(p) { \
+ if ((p)->p_lock++ == 0 && ((p)->p_flag & P_INMEM) == 0) \
+ faultin(p); \
+}
+#define PRELE(p) (--(p)->p_lock)
+
extern struct proc *pidhash[]; /* In param.c. */
extern struct pgrp *pgrphash[]; /* In param.c. */
extern struct proc *curproc; /* Current running proc. */
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 9c6c159..55b176e 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ptrace.h 8.2 (Berkeley) 1/4/94
- * $Id: ptrace.h,v 1.3 1994/08/08 13:00:27 davidg Exp $
+ * $Id: ptrace.h,v 1.4 1995/03/16 18:16:23 bde Exp $
*/
#ifndef _SYS_PTRACE_H_
@@ -48,10 +48,8 @@
#define PT_KILL 8 /* kill the child process */
#define PT_STEP 9 /* single step the child */
-#ifdef notdef
#define PT_ATTACH 10 /* trace some running process */
#define PT_DETACH 11 /* stop tracing a process */
-#endif
#define PT_FIRSTMACH 32 /* for machine-specific requests */
#include <machine/ptrace.h> /* machine-specific requests, if any */
OpenPOWER on IntegriCloud