proc.h (82611) | proc.h (83045) |
---|---|
1/*- 2 * Copyright (c) 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)proc.h 8.15 (Berkeley) 5/19/95 | 1/*- 2 * Copyright (c) 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)proc.h 8.15 (Berkeley) 5/19/95 |
39 * $FreeBSD: head/sys/sys/proc.h 82611 2001-08-31 00:51:35Z dillon $ | 39 * $FreeBSD: head/sys/sys/proc.h 83045 2001-09-05 01:22:14Z obrien $ |
40 */ 41 42#ifndef _SYS_PROC_H_ 43#define _SYS_PROC_H_ 44 45#include <sys/callout.h> /* For struct callout. */ 46#include <sys/event.h> /* For struct klist. */ 47#include <sys/filedesc.h> --- 6 unchanged lines hidden (view full) --- 54#include <sys/time.h> /* For structs itimerval, timeval. */ 55#endif 56#include <sys/ucred.h> 57#include <machine/proc.h> /* Machine-dependent proc substruct. */ 58 59/* 60 * One structure allocated per session. 61 */ | 40 */ 41 42#ifndef _SYS_PROC_H_ 43#define _SYS_PROC_H_ 44 45#include <sys/callout.h> /* For struct callout. */ 46#include <sys/event.h> /* For struct klist. */ 47#include <sys/filedesc.h> --- 6 unchanged lines hidden (view full) --- 54#include <sys/time.h> /* For structs itimerval, timeval. */ 55#endif 56#include <sys/ucred.h> 57#include <machine/proc.h> /* Machine-dependent proc substruct. */ 58 59/* 60 * One structure allocated per session. 61 */ |
62struct session { | 62struct session { |
63 int s_count; /* Ref cnt; pgrps in session. */ 64 struct proc *s_leader; /* Session leader. */ 65 struct vnode *s_ttyvp; /* Vnode of controlling terminal. */ 66 struct tty *s_ttyp; /* Controlling terminal. */ 67 pid_t s_sid; /* Session ID. */ 68 /* Setlogin() name: */ 69 char s_login[roundup(MAXLOGNAME, sizeof(long))]; 70}; 71 72/* 73 * One structure allocated per process group. 74 */ | 63 int s_count; /* Ref cnt; pgrps in session. */ 64 struct proc *s_leader; /* Session leader. */ 65 struct vnode *s_ttyvp; /* Vnode of controlling terminal. */ 66 struct tty *s_ttyp; /* Controlling terminal. */ 67 pid_t s_sid; /* Session ID. */ 68 /* Setlogin() name: */ 69 char s_login[roundup(MAXLOGNAME, sizeof(long))]; 70}; 71 72/* 73 * One structure allocated per process group. 74 */ |
75struct pgrp { | 75struct pgrp { |
76 LIST_ENTRY(pgrp) pg_hash; /* Hash chain. */ 77 LIST_HEAD(, proc) pg_members; /* Pointer to pgrp members. */ 78 struct session *pg_session; /* Pointer to session. */ 79 struct sigiolst pg_sigiolst; /* List of sigio sources. */ 80 pid_t pg_id; /* Pgrp id. */ 81 int pg_jobc; /* # procs qualifying pgrp for job control */ 82}; 83 | 76 LIST_ENTRY(pgrp) pg_hash; /* Hash chain. */ 77 LIST_HEAD(, proc) pg_members; /* Pointer to pgrp members. */ 78 struct session *pg_session; /* Pointer to session. */ 79 struct sigiolst pg_sigiolst; /* List of sigio sources. */ 80 pid_t pg_id; /* Pgrp id. */ 81 int pg_jobc; /* # procs qualifying pgrp for job control */ 82}; 83 |
84struct procsig { | 84struct procsig { |
85 sigset_t ps_sigignore; /* Signals being ignored. */ 86 sigset_t ps_sigcatch; /* Signals being caught by user. */ 87 int ps_flag; 88 struct sigacts *ps_sigacts; /* Signal actions, state. */ 89 int ps_refcnt; 90}; 91 92#define PS_NOCLDWAIT 0x0001 /* No zombies if child dies */ 93#define PS_NOCLDSTOP 0x0002 /* No SIGCHLD when children stop. */ 94 95/* 96 * pargs, used to hold a copy of the command line, if it had a sane length. 97 */ | 85 sigset_t ps_sigignore; /* Signals being ignored. */ 86 sigset_t ps_sigcatch; /* Signals being caught by user. */ 87 int ps_flag; 88 struct sigacts *ps_sigacts; /* Signal actions, state. */ 89 int ps_refcnt; 90}; 91 92#define PS_NOCLDWAIT 0x0001 /* No zombies if child dies */ 93#define PS_NOCLDSTOP 0x0002 /* No SIGCHLD when children stop. */ 94 95/* 96 * pargs, used to hold a copy of the command line, if it had a sane length. 97 */ |
98struct pargs { | 98struct pargs { |
99 u_int ar_ref; /* Reference count. */ 100 u_int ar_length; /* Length. */ 101 u_char ar_args[0]; /* Arguments. */ 102}; 103 104/*- 105 * Description of a process. 106 * --- 30 unchanged lines hidden (view full) --- 137 * If the locking key specifies two identifiers (for example, p_pptr) then 138 * either lock is sufficient for read access, but both locks must be held 139 * for write access. 140 */ 141struct ithd; 142struct nlminfo; 143struct trapframe; 144 | 99 u_int ar_ref; /* Reference count. */ 100 u_int ar_length; /* Length. */ 101 u_char ar_args[0]; /* Arguments. */ 102}; 103 104/*- 105 * Description of a process. 106 * --- 30 unchanged lines hidden (view full) --- 137 * If the locking key specifies two identifiers (for example, p_pptr) then 138 * either lock is sufficient for read access, but both locks must be held 139 * for write access. 140 */ 141struct ithd; 142struct nlminfo; 143struct trapframe; 144 |
145struct proc { | 145struct proc { |
146 TAILQ_ENTRY(proc) p_procq; /* (j) Run/mutex queue. */ 147 TAILQ_ENTRY(proc) p_slpq; /* (j) Sleep queue. */ 148 LIST_ENTRY(proc) p_list; /* (d) List of all processes. */ 149 150 /* substructures: */ 151 struct ucred *p_ucred; /* (c + k) Process owner's identity. */ 152 struct filedesc *p_fd; /* (b) Ptr to open files structure. */ 153 struct pstats *p_stats; /* (b) Accounting/statistics (CPU). */ --- 360 unchanged lines hidden --- | 146 TAILQ_ENTRY(proc) p_procq; /* (j) Run/mutex queue. */ 147 TAILQ_ENTRY(proc) p_slpq; /* (j) Sleep queue. */ 148 LIST_ENTRY(proc) p_list; /* (d) List of all processes. */ 149 150 /* substructures: */ 151 struct ucred *p_ucred; /* (c + k) Process owner's identity. */ 152 struct filedesc *p_fd; /* (b) Ptr to open files structure. */ 153 struct pstats *p_stats; /* (b) Accounting/statistics (CPU). */ --- 360 unchanged lines hidden --- |