BSD 4_4_Lite2 release
[unix-history] / usr / src / sys / sys / proc.h
index a7c0631..6e2b1ff 100644 (file)
@@ -7,9 +7,35 @@
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  * the permission of UNIX System Laboratories, Inc.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)proc.h      8.12 (Berkeley) %G%
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)proc.h      8.15 (Berkeley) 5/19/95
  */
 
 #ifndef _SYS_PROC_H_
  */
 
 #ifndef _SYS_PROC_H_
@@ -106,7 +132,9 @@ struct      proc {
 
        struct  vnode *p_textvp;        /* Vnode of executable. */
 
 
        struct  vnode *p_textvp;        /* Vnode of executable. */
 
-       long    p_spare[3];             /* pad to 256, avoid shifting eproc. */
+       short   p_locks;                /* DEBUG: lockmgr count of held locks */
+       short   p_simple_locks;         /* DEBUG: count of held simple locks */
+       long    p_spare[2];             /* pad to 256, avoid shifting eproc. */
 
 /* End area that is zeroed on creation. */
 #define        p_endzero       p_hash.le_next
 
 /* End area that is zeroed on creation. */
 #define        p_endzero       p_hash.le_next
@@ -133,7 +161,8 @@ struct      proc {
 
 /* End area that is copied on creation. */
 #define        p_endcopy       p_thread
 
 /* End area that is copied on creation. */
 #define        p_endcopy       p_thread
-       int     p_thread;       /* Id for this "thread"; Mach glue. XXX */
+
+       void    *p_thread;      /* Id for this "thread"; Mach glue. XXX */
        struct  user *p_addr;   /* Kernel virtual addr of u-area (PROC ONLY). */
        struct  mdproc p_md;    /* Any machine-dependent fields. */
 
        struct  user *p_addr;   /* Kernel virtual addr of u-area (PROC ONLY). */
        struct  mdproc p_md;    /* Any machine-dependent fields. */
 
@@ -234,7 +263,14 @@ struct     prochd {
 struct proc *pfind __P((pid_t));       /* Find process by id. */
 struct pgrp *pgfind __P((pid_t));      /* Find process group by id. */
 
 struct proc *pfind __P((pid_t));       /* Find process by id. */
 struct pgrp *pgfind __P((pid_t));      /* Find process group by id. */
 
+int    chgproccnt __P((uid_t uid, int diff));
+int    enterpgrp __P((struct proc *p, pid_t pgid, int mksess));
+void   fixjobc __P((struct proc *p, struct pgrp *pgrp, int entering));
+int    inferior __P((struct proc *p));
+int    leavepgrp __P((struct proc *p));
 void   mi_switch __P((void));
 void   mi_switch __P((void));
+void   pgdelete __P((struct pgrp *pgrp));
+void   procinit __P((void));
 void   resetpriority __P((struct proc *));
 void   setrunnable __P((struct proc *));
 void   setrunqueue __P((struct proc *));
 void   resetpriority __P((struct proc *));
 void   setrunnable __P((struct proc *));
 void   setrunqueue __P((struct proc *));