proc.h (41136) | proc.h (41931) |
---|---|
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 * $Id: proc.h,v 1.61 1998/11/11 10:56:05 truckman Exp $ | 39 * $Id: proc.h,v 1.62 1998/11/13 17:53:55 dg Exp $ |
40 */ 41 42#ifndef _SYS_PROC_H_ 43#define _SYS_PROC_H_ 44 45#include <machine/proc.h> /* Machine-dependent proc substruct. */ 46#include <sys/callout.h> /* For struct callout_handle. */ 47#include <sys/rtprio.h> /* For struct rtprio. */ 48#include <sys/select.h> /* For struct selinfo. */ 49#include <sys/signal.h> | 40 */ 41 42#ifndef _SYS_PROC_H_ 43#define _SYS_PROC_H_ 44 45#include <machine/proc.h> /* Machine-dependent proc substruct. */ 46#include <sys/callout.h> /* For struct callout_handle. */ 47#include <sys/rtprio.h> /* For struct rtprio. */ 48#include <sys/select.h> /* For struct selinfo. */ 49#include <sys/signal.h> |
50#ifdef COMPAT_LINUX_THREADS 51#include <sys/signalvar.h> 52#endif /* COMPAT_LINUX_THREADS */ |
|
50#ifndef KERNEL 51#include <sys/time.h> /* For structs itimerval, timeval. */ 52#endif 53#include <sys/ucred.h> 54#include <sys/queue.h> 55#include <sys/filedesc.h> 56 57/* --- 15 unchanged lines hidden (view full) --- 73 LIST_ENTRY(pgrp) pg_hash; /* Hash chain. */ 74 LIST_HEAD(, proc) pg_members; /* Pointer to pgrp members. */ 75 struct session *pg_session; /* Pointer to session. */ 76 struct sigiolst pg_sigiolst; /* List of sigio sources. */ 77 pid_t pg_id; /* Pgrp id. */ 78 int pg_jobc; /* # procs qualifying pgrp for job control */ 79}; 80 | 53#ifndef KERNEL 54#include <sys/time.h> /* For structs itimerval, timeval. */ 55#endif 56#include <sys/ucred.h> 57#include <sys/queue.h> 58#include <sys/filedesc.h> 59 60/* --- 15 unchanged lines hidden (view full) --- 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 |
84#ifdef COMPAT_LINUX_THREADS 85struct procsig { 86#define ps_begincopy ps_sigignore 87 sigset_t ps_sigignore; /* Signals being ignored. */ 88 sigset_t ps_sigcatch; /* Signals being caught by user. */ 89 int ps_flag; 90 struct sigacts ps_sigacts; 91#define ps_endcopy ps_refcnt 92 int ps_refcnt; 93 int ps_posix; 94}; 95 96#endif /* COMPAT_LINUX_THREADS */ |
|
81/* 82 * Description of a process. 83 * 84 * This structure contains the information needed to manage a thread of 85 * control, known in UN*X as a process; it has references to substructures 86 * containing descriptions of things that the process uses, but may share 87 * with related processes. The process structure and the substructures 88 * are always addressable except for those marked "(PROC ONLY)" below, --- 70 unchanged lines hidden (view full) --- 159 short p_simple_locks; /* DEBUG: count of held simple locks */ 160 unsigned int p_stops; /* procfs event bitmask */ 161 unsigned int p_stype; /* procfs stop event type */ 162 char p_step; /* procfs stop *once* flag */ 163 unsigned char p_pfsflags; /* procfs flags */ 164 char p_pad3[2]; /* padding for alignment */ 165 register_t p_retval[2]; /* syscall aux returns */ 166 struct sigiolst p_sigiolst; /* list of sigio sources */ | 97/* 98 * Description of a process. 99 * 100 * This structure contains the information needed to manage a thread of 101 * control, known in UN*X as a process; it has references to substructures 102 * containing descriptions of things that the process uses, but may share 103 * with related processes. The process structure and the substructures 104 * are always addressable except for those marked "(PROC ONLY)" below, --- 70 unchanged lines hidden (view full) --- 175 short p_simple_locks; /* DEBUG: count of held simple locks */ 176 unsigned int p_stops; /* procfs event bitmask */ 177 unsigned int p_stype; /* procfs stop event type */ 178 char p_step; /* procfs stop *once* flag */ 179 unsigned char p_pfsflags; /* procfs flags */ 180 char p_pad3[2]; /* padding for alignment */ 181 register_t p_retval[2]; /* syscall aux returns */ 182 struct sigiolst p_sigiolst; /* list of sigio sources */ |
183#ifdef COMPAT_LINUX_THREADS 184 int p_sigparent; /* signal to parent on exit */ 185 sigset_t p_oldsigmask; /* saved mask from before sigpause */ 186 int p_sig; /* for core dump/debugger XXX */ 187 u_long p_code; /* for core dump/debugger XXX */ 188#endif /* COMPAT_LINUX_THREADS */ |
|
167 168/* End area that is zeroed on creation. */ 169#define p_endzero p_startcopy 170 171/* The following fields are all copied upon creation in fork. */ | 189 190/* End area that is zeroed on creation. */ 191#define p_endzero p_startcopy 192 193/* The following fields are all copied upon creation in fork. */ |
194#ifndef COMPAT_LINUX_THREADS |
|
172#define p_startcopy p_sigmask | 195#define p_startcopy p_sigmask |
196#else 197#define p_startcopy p_procsig 198#endif /* COMPAT_LINUX_THREADS */ |
|
173 | 199 |
200#ifdef COMPAT_LINUX_THREADS 201 struct procsig *p_procsig; 202#define p_sigignore p_procsig->ps_sigignore 203#define p_sigcatch p_procsig->ps_sigcatch 204#endif /* COMPAT_LINUX_THREADS */ |
|
174 sigset_t p_sigmask; /* Current signal mask. */ | 205 sigset_t p_sigmask; /* Current signal mask. */ |
206#ifndef COMPAT_LINUX_THREADS |
|
175 sigset_t p_sigignore; /* Signals being ignored. */ 176 sigset_t p_sigcatch; /* Signals being caught by user. */ 177 | 207 sigset_t p_sigignore; /* Signals being ignored. */ 208 sigset_t p_sigcatch; /* Signals being caught by user. */ 209 |
210#endif /* COMPAT_LINUX_THREADS */ |
|
178 u_char p_priority; /* Process priority. */ 179 u_char p_usrpri; /* User-priority based on p_cpu and p_nice. */ 180 char p_nice; /* Process "nice" value. */ 181 char p_comm[MAXCOMLEN+1]; 182 183 struct pgrp *p_pgrp; /* Pointer to process group. */ 184 185 struct sysentvec *p_sysent; /* System call dispatch information. */ --- 158 unchanged lines hidden (view full) --- 344void remrq __P((struct proc *)); 345void cpu_switch __P((struct proc *)); 346void unsleep __P((struct proc *)); 347void wakeup_one __P((void *chan)); 348 349void cpu_exit __P((struct proc *)) __dead2; 350void exit1 __P((struct proc *, int)) __dead2; 351void cpu_fork __P((struct proc *, struct proc *)); | 211 u_char p_priority; /* Process priority. */ 212 u_char p_usrpri; /* User-priority based on p_cpu and p_nice. */ 213 char p_nice; /* Process "nice" value. */ 214 char p_comm[MAXCOMLEN+1]; 215 216 struct pgrp *p_pgrp; /* Pointer to process group. */ 217 218 struct sysentvec *p_sysent; /* System call dispatch information. */ --- 158 unchanged lines hidden (view full) --- 377void remrq __P((struct proc *)); 378void cpu_switch __P((struct proc *)); 379void unsleep __P((struct proc *)); 380void wakeup_one __P((void *chan)); 381 382void cpu_exit __P((struct proc *)) __dead2; 383void exit1 __P((struct proc *, int)) __dead2; 384void cpu_fork __P((struct proc *, struct proc *)); |
385#ifndef COMPAT_LINUX_THREADS |
|
352int fork1 __P((struct proc *, int)); | 386int fork1 __P((struct proc *, int)); |
387#else 388int fork1 __P((struct proc *, int)); 389#endif /* COMPAT_LINUX_THREADS */ |
|
353int trace_req __P((struct proc *)); 354void cpu_wait __P((struct proc *)); 355int cpu_coredump __P((struct proc *, struct vnode *, struct ucred *)); 356void setsugid __P((struct proc *p)); 357#endif /* KERNEL */ 358 359#endif /* !_SYS_PROC_H_ */ | 390int trace_req __P((struct proc *)); 391void cpu_wait __P((struct proc *)); 392int cpu_coredump __P((struct proc *, struct vnode *, struct ucred *)); 393void setsugid __P((struct proc *p)); 394#endif /* KERNEL */ 395 396#endif /* !_SYS_PROC_H_ */ |