Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/sys/proc.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/sys/proc.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.133.2.6 retrieving revision 1.134 diff -u -p -r1.133.2.6 -r1.134 --- src/sys/sys/proc.h 2002/10/10 18:44:46 1.133.2.6 +++ src/sys/sys/proc.h 2001/09/18 19:36:32 1.134 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.133.2.6 2002/10/10 18:44:46 jdolecek Exp $ */ +/* $NetBSD: proc.h,v 1.134 2001/09/18 19:36:32 jdolecek Exp $ */ /*- * Copyright (c) 1986, 1989, 1991, 1993 @@ -45,7 +45,6 @@ #if defined(_KERNEL_OPT) #include "opt_multiprocessor.h" -#include "opt_kstack.h" #endif #if defined(_KERNEL) @@ -56,7 +55,6 @@ #include #include #include -#include /* * One structure allocated per session. @@ -89,7 +87,6 @@ struct pgrp { */ struct exec_package; struct ps_strings; -struct ras; struct emul { const char *e_name; /* Symbolic name */ @@ -104,7 +101,7 @@ struct emul { const struct sysent *e_sysent; /* System call array */ const char * const *e_syscallnames; /* System call name array */ /* Signal sending function */ - void (*e_sendsig) __P((int, sigset_t *, u_long)); + void (*e_sendsig) __P((sig_t, int, sigset_t *, u_long)); void (*e_trapsignal) __P((struct proc *, int, u_long)); char *e_sigcode; /* Start of sigcode */ char *e_esigcode; /* End of sigcode */ @@ -124,10 +121,6 @@ struct emul { #else void (*e_syscall) __P((void)); #endif - /* Emulation specific sysctl */ - int (*e_sysctl) __P((int *, u_int , void *, size_t *, - void *, size_t, struct proc *p)); - int (*e_fault) __P((struct proc *, vaddr_t, int, int)); }; /* @@ -177,16 +170,12 @@ struct proc { LIST_ENTRY(proc) p_sibling; /* List of sibling processes */ LIST_HEAD(, proc) p_children; /* Pointer to list of children */ - LIST_HEAD(, ras) p_raslist; /* Pointer to RAS queue */ - u_int p_nras; /* number of RASs */ - struct simplelock p_raslock; /* Lock for RAS queue */ - /* * The following fields are all zeroed upon creation in fork. */ -#define p_startzero p_opptr +#define p_startzero p_oppid - struct proc *p_opptr; /* Save parent during ptrace. */ + pid_t p_oppid; /* Save parent pid during ptrace. XXX */ int p_dupfd; /* Sideways return value from filedescopen. XXX */ /* Scheduling */ @@ -208,7 +197,6 @@ struct proc { int p_traceflag; /* Kernel trace points */ struct file *p_tracep; /* Trace to file */ - void *p_systrace; /* Back pointer to systrace */ struct vnode *p_textvp; /* Vnode of executable */ @@ -220,8 +208,6 @@ struct proc { * Per-process emulation data, or NULL. * Malloc type M_EMULDATA */ - const struct execsw *p_execsw; /* Exec package information */ - struct klist p_klist; /* Knotes attached to this process */ /* * End area that is zeroed on creation @@ -285,29 +271,27 @@ struct proc { #define P_ZOMBIE(p) ((p)->p_stat == SZOMB || (p)->p_stat == SDEAD) /* These flags are kept in p_flag. */ -#define P_ADVLOCK 0x000001 /* Process may hold a POSIX advisory lock */ -#define P_CONTROLT 0x000002 /* Has a controlling terminal */ -#define P_INMEM 0x000004 /* Loaded into memory */ -#define P_NOCLDSTOP 0x000008 /* No SIGCHLD when children stop */ -#define P_PPWAIT 0x000010 /* Parent is waiting for child to exec/exit */ -#define P_PROFIL 0x000020 /* Has started profiling */ -#define P_SELECT 0x000040 /* Selecting; wakeup/waiting danger */ -#define P_SINTR 0x000080 /* Sleep is interruptible */ -#define P_SUGID 0x000100 /* Had set id privileges since last exec */ -#define P_SYSTEM 0x000200 /* System proc: no sigs, stats or swapping */ -#define P_TIMEOUT 0x000400 /* Timing out during sleep */ -#define P_TRACED 0x000800 /* Debugged process being traced */ -#define P_WAITED 0x001000 /* Debugging process has waited for child */ -#define P_WEXIT 0x002000 /* Working on exiting */ -#define P_EXEC 0x004000 /* Process called exec */ -#define P_OWEUPC 0x008000 /* Owe process an addupc() call at next ast */ -#define P_FSTRACE 0x010000 /* Debugger process being traced by procfs */ -#define P_NOCLDWAIT 0x020000 /* No zombies if child dies */ -#define P_32 0x040000 /* 32-bit process (used on 64-bit kernels) */ -#define P_BIGLOCK 0x080000 /* Process needs kernel "big lock" to run */ -#define P_INEXEC 0x100000 /* Process is exec'ing and cannot be traced */ -#define P_SYSTRACE 0x200000 /* Process system call tracing active */ -#define P_CHTRACED 0x400000 /* Child has been traced & reparented */ +#define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock */ +#define P_CONTROLT 0x00002 /* Has a controlling terminal */ +#define P_INMEM 0x00004 /* Loaded into memory */ +#define P_NOCLDSTOP 0x00008 /* No SIGCHLD when children stop */ +#define P_PPWAIT 0x00010 /* Parent is waiting for child to exec/exit */ +#define P_PROFIL 0x00020 /* Has started profiling */ +#define P_SELECT 0x00040 /* Selecting; wakeup/waiting danger */ +#define P_SINTR 0x00080 /* Sleep is interruptible */ +#define P_SUGID 0x00100 /* Had set id privileges since last exec */ +#define P_SYSTEM 0x00200 /* System proc: no sigs, stats or swapping */ +#define P_TIMEOUT 0x00400 /* Timing out during sleep */ +#define P_TRACED 0x00800 /* Debugged process being traced */ +#define P_WAITED 0x01000 /* Debugging process has waited for child */ +#define P_WEXIT 0x02000 /* Working on exiting */ +#define P_EXEC 0x04000 /* Process called exec */ +#define P_OWEUPC 0x08000 /* Owe process an addupc() call at next ast */ +#define P_FSTRACE 0x10000 /* Debugger process being traced by procfs */ +#define P_NOCLDWAIT 0x20000 /* No zombies if child dies */ +#define P_32 0x40000 /* 32-bit process (used on 64-bit kernels) */ +#define P_BIGLOCK 0x80000 /* Process needs kernel "big lock" to run */ + /* * Macro to compute the exit signal to be delivered. @@ -374,8 +358,6 @@ do { \ #define FORK_SHARECWD 0x04 /* Share cdir/rdir/cmask */ #define FORK_SHAREFILES 0x08 /* Share file descriptors */ #define FORK_SHARESIGS 0x10 /* Share signal actions */ -#define FORK_NOWAIT 0x20 /* Make init the parent of the child */ -#define FORK_CLEANFILES 0x40 /* Start with a clean descriptor set */ #define PIDHASH(pid) (&pidhashtbl[(pid) & pidhash]) extern LIST_HEAD(pidhashhead, proc) *pidhashtbl; @@ -430,21 +412,17 @@ int inferior(struct proc *p, struct proc int leavepgrp(struct proc *p); void yield(void); void preempt(struct proc *); -void mi_switch(struct proc *, struct proc *); -struct proc *chooseproc(void); +void mi_switch(struct proc *); void pgdelete(struct pgrp *pgrp); void procinit(void); #ifndef remrunqueue void remrunqueue(struct proc *); #endif +void resetpriority(struct proc *); +void setrunnable(struct proc *); #ifndef setrunqueue void setrunqueue(struct proc *); #endif -#ifndef nextrunqueue -struct proc *nextrunqueue(void); -#endif -void resetpriority(struct proc *); -void setrunnable(struct proc *); void suspendsched(void); int ltsleep(void *chan, int pri, const char *wmesg, int timo, __volatile struct simplelock *); @@ -459,10 +437,7 @@ int fork1(struct proc *, int, int, void void rqinit(void); int groupmember(gid_t, struct ucred *); #ifndef cpu_switch -void cpu_switch(struct proc *, struct proc *); -#endif -#ifndef cpu_idle -void cpu_idle(void); +void cpu_switch(struct proc *); #endif void cpu_exit(struct proc *); void cpu_fork(struct proc *, struct proc *, void *, size_t, @@ -492,23 +467,5 @@ void p_sugid(struct proc*); void proc_trampoline_mp(void); /* XXX */ #endif -#ifdef KSTACK_CHECK_MAGIC -void kstack_setup_magic(const struct proc *); -void kstack_check_magic(const struct proc *); -#endif - -/* - * kernel stack paramaters - * XXX require sizeof(struct user) - */ -/* the lowest address of kernel stack */ -#ifndef KSTACK_LOWEST_ADDR -#define KSTACK_LOWEST_ADDR(p) ((caddr_t)ALIGN((p)->p_addr + 1)) -#endif -/* size of kernel stack */ -#ifndef KSTACK_SIZE -#define KSTACK_SIZE (USPACE - ALIGN(sizeof(struct user))) -#endif - #endif /* _KERNEL */ #endif /* !_SYS_PROC_H_ */