Rename a lot of process flags.

This commit is contained in:
cgd 1994-05-04 03:41:12 +00:00
parent 33b1618a57
commit 4bbabd8e7a
32 changed files with 72 additions and 76 deletions

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_i386.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: process_machdep.c,v 1.5 1994/04/03 22:50:14 mycroft Exp $
* $Id: process_machdep.c,v 1.6 1994/05/04 03:41:12 cgd Exp $
*/
/*
@ -86,7 +86,7 @@ process_read_regs(p, regs)
void *ptr;
struct trapframe *tp;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return (EIO);
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);
@ -119,7 +119,7 @@ process_write_regs(p, regs)
struct trapframe *tp;
int eflags;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return (EIO);
ptr = (char *)p->p_addr + ((char *) p->p_regs - (char *) kstack);
@ -156,7 +156,7 @@ process_sstep(p, sstep)
void *ptr;
struct trapframe *tp;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return (EIO);
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);
@ -185,7 +185,7 @@ process_set_pc(p, addr)
void *ptr;
struct trapframe *tp;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return (EIO);
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.36 1994/04/02 22:15:03 mycroft Exp $
* $Id: trap.c,v 1.37 1994/05/04 03:41:14 cgd Exp $
*/
/*
@ -242,9 +242,9 @@ trap(frame)
case T_ASTFLT|T_USER: /* Allow process switch */
cnt.v_soft++;
if ((p->p_flag & SOWEUPC) && p->p_stats->p_prof.pr_scale) {
if ((p->p_flag & P_OWEUPC) && p->p_stats->p_prof.pr_scale) {
addupc(frame.tf_eip, &p->p_stats->p_prof, 1);
p->p_flag &= ~SOWEUPC;
p->p_flag &= ~P_OWEUPC;
}
goto out;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
* $Id: cpu.h,v 1.15 1994/04/07 06:49:19 mycroft Exp $
* $Id: cpu.h,v 1.16 1994/05/04 03:41:21 cgd Exp $
*/
#ifndef _I386_CPU_H_
@ -81,8 +81,8 @@ int want_resched; /* resched() was called */
* buffer pages are invalid. On the i386, request an ast to send us
* through trap(), marking the proc as needing a profiling tick.
*/
#define profile_tick(p, framep) ((p)->p_flag |= SOWEUPC, setsoftast())
#define need_proftick(p) ((p)->p_flag |= SOWEUPC, setsoftast())
#define profile_tick(p, framep) ((p)->p_flag |= P_OWEUPC, setsoftast())
#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, setsoftast())
/*
* Notify the current process (p) that it has a signal pending,

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: process_machdep.c,v 1.4 1994/01/28 23:45:21 jtc Exp $
* $Id: process_machdep.c,v 1.5 1994/05/04 03:41:31 cgd Exp $
*/
/*
@ -74,7 +74,7 @@ process_read_regs(p, regs)
{
struct frame *frame;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return EIO;
frame = (struct frame *)
@ -94,7 +94,7 @@ process_write_regs(p, regs)
{
struct frame *frame;
if ((p->p_flag & SLOAD) == 0)
if ((p->p_flag & P_INMEM) == 0)
return EIO;
frame = (struct frame *)

View File

@ -1 +1 @@
revision 1.38 intentionally removed
revision 1.39 intentionally removed

View File

@ -1 +1 @@
revision 1.18 intentionally removed
revision 1.19 intentionally removed

View File

@ -1 +1 @@
revision 1.13 intentionally removed
revision 1.14 intentionally removed

View File

@ -1 +1 @@
revision 1.47 intentionally removed
revision 1.48 intentionally removed

View File

@ -1 +1 @@
revision 1.16 intentionally removed
revision 1.17 intentionally removed

View File

@ -1 +1 @@
revision 1.12 intentionally removed
revision 1.13 intentionally removed

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)kern_kinfo.c 7.17 (Berkeley) 6/26/91
* $Id: kern_kinfo.c,v 1.13 1994/01/28 04:55:41 cgd Exp $
* $Id: kern_kinfo.c,v 1.14 1994/05/04 03:41:55 cgd Exp $
*/
#include <sys/param.h>
@ -186,7 +186,7 @@ again:
break;
case KINFO_PROC_TTY:
if ((p->p_flag&SCTTY) == 0 ||
if ((p->p_flag&P_CONTROLT) == 0 ||
p->p_session->s_ttyp == NULL ||
p->p_session->s_ttyp->t_dev != (dev_t)arg)
continue;
@ -256,7 +256,7 @@ fill_eproc(p, ep)
ep->e_ppid = 0;
ep->e_pgid = p->p_pgrp->pg_id;
ep->e_jobc = p->p_pgrp->pg_jobc;
if ((p->p_flag&SCTTY) &&
if ((p->p_flag&P_CONTROLT) &&
(tp = ep->e_sess->s_ttyp)) {
ep->e_tdev = tp->t_dev;
ep->e_tpgid = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)kern_proc.c 7.16 (Berkeley) 6/28/91
* $Id: kern_proc.c,v 1.5 1993/12/18 04:20:57 mycroft Exp $
* $Id: kern_proc.c,v 1.6 1994/05/04 03:41:56 cgd Exp $
*/
#include <sys/param.h>
@ -71,7 +71,7 @@ inferior(p)
*/
struct proc *
pfind(pid)
register pid;
register pid_t pid;
{
register struct proc *p = pidhash[PIDHASH(pid)];
@ -139,7 +139,7 @@ enterpgrp(p, pgid, mksess)
sess->s_ttyp = NULL;
bcopy(p->p_session->s_login, sess->s_login,
sizeof(sess->s_login));
p->p_flag &= ~SCTTY;
p->p_flag &= ~P_CONTROLT;
pgrp->pg_session = sess;
#ifdef DIAGNOSTIC
if (p != curproc)

View File

@ -1 +1 @@
revision 1.11 intentionally removed
revision 1.12 intentionally removed

View File

@ -1 +1 @@
revision 1.17 intentionally removed
revision 1.18 intentionally removed

View File

@ -1 +1 @@
revision 1.15 intentionally removed
revision 1.16 intentionally removed

View File

@ -1 +1 @@
revision 1.10 intentionally removed
revision 1.11 intentionally removed

View File

@ -1 +1 @@
revision 1.10 intentionally removed
revision 1.11 intentionally removed

View File

@ -1 +1 @@
revision 1.27 intentionally removed
revision 1.28 intentionally removed

View File

@ -1 +1 @@
revision 1.44 intentionally removed
revision 1.45 intentionally removed

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tty_pty.c 7.21 (Berkeley) 5/30/91
* $Id: tty_pty.c,v 1.19 1994/04/25 05:48:41 cgd Exp $
* $Id: tty_pty.c,v 1.20 1994/05/04 03:42:07 cgd Exp $
*/
/*
@ -175,7 +175,7 @@ again:
if ((p->p_sigignore & sigmask(SIGTTIN)) ||
(p->p_sigmask & sigmask(SIGTTIN)) ||
p->p_pgrp->pg_jobc == 0 ||
p->p_flag&SPPWAIT)
p->p_flag&P_PPWAIT)
return (EIO);
pgsignal(p->p_pgrp, SIGTTIN, 1);
if (error = ttysleep(tp, (caddr_t)&lbolt,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tty_tty.c 7.15 (Berkeley) 5/28/91
* $Id: tty_tty.c,v 1.7 1993/12/18 04:22:22 mycroft Exp $
* $Id: tty_tty.c,v 1.8 1994/05/04 03:42:09 cgd Exp $
*/
/*
@ -46,7 +46,7 @@
#include <sys/vnode.h>
#include <sys/file.h>
#define cttyvp(p) ((p)->p_flag&SCTTY ? (p)->p_session->s_ttyvp : NULL)
#define cttyvp(p) ((p)->p_flag&P_CONTROLT ? (p)->p_session->s_ttyvp : NULL)
/*ARGSUSED*/
int
@ -122,7 +122,7 @@ cttyioctl(dev, cmd, addr, flag, p)
return (EINVAL);
if (cmd == TIOCNOTTY) {
if (!SESS_LEADER(p)) {
p->p_flag &= ~SCTTY;
p->p_flag &= ~P_CONTROLT;
return (0);
} else
return (EINVAL);

View File

@ -37,7 +37,7 @@
* From:
* Id: fdesc_vnops.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: fdesc_vnops.c,v 1.12 1994/04/25 03:49:55 cgd Exp $
* $Id: fdesc_vnops.c,v 1.13 1994/05/04 03:42:14 cgd Exp $
*/
/*
@ -62,7 +62,7 @@
#include <ufs/dir.h> /* For readdir() XXX */
#define cttyvp(p) ((p)->p_flag&SCTTY ? (p)->p_session->s_ttyvp : NULL)
#define cttyvp(p) ((p)->p_flag&P_CONTROLT ? (p)->p_session->s_ttyvp : NULL)
#define FDL_WANT 0x01
#define FDL_LOCKED 0x02

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_ctl.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_ctl.c,v 1.7 1994/01/20 21:23:05 ws Exp $
* $Id: procfs_ctl.c,v 1.8 1994/05/04 03:42:18 cgd Exp $
*/
#include <sys/param.h>
@ -58,7 +58,7 @@
*/
#define TRACE_WAIT_P(p) \
((p)->p_stat == SSTOP && \
((p)->p_flag & STRC))
((p)->p_flag & P_TRACED))
#define PROCFS_CTL_ATTACH 1
#define PROCFS_CTL_DETACH 2
@ -87,7 +87,7 @@ procfs_control(curp, p, op)
/*
* Target process must be stopped and
* be set up for tracing (SFSTRC flag set).
* be set up for tracing (P_FSTRACE flag set).
* Of course ATTACH is allowed any time.
* Allow DETACH to take place at any time for sanity.
*/
@ -113,7 +113,7 @@ procfs_control(curp, p, op)
* by the calling process.
*/
/* check whether already being traced */
if (p->p_flag & STRC)
if (p->p_flag & P_TRACED)
return (EBUSY);
/* can't trace yourself! */
@ -129,7 +129,7 @@ procfs_control(curp, p, op)
* proc gets to see all the action.
* Stop the target.
*/
p->p_flag |= STRC|SFSTRC;
p->p_flag |= P_TRACED|P_FSTRACE;
psignal(p, SIGSTOP);
break;
@ -139,14 +139,14 @@ procfs_control(curp, p, op)
*/
case PROCFS_CTL_DETACH:
/* if not being traced, then this is a painless no-op */
if ((p->p_flag & SFSTRC) == 0)
if ((p->p_flag & P_FSTRACE) == 0)
return (0);
if (error = process_sstep(p, 0))
return error;
/* not being traced any more */
p->p_flag &= ~(STRC|SFSTRC);
p->p_flag &= ~(P_TRACED|P_FSTRACE);
setrun(p);
return 0;
@ -172,7 +172,7 @@ procfs_control(curp, p, op)
* Wait for the target process to stop.
*/
while ((p->p_stat != SSTOP) &&
(p->p_flag & SFSTRC)) {
(p->p_flag & P_FSTRACE)) {
if (error = tsleep((caddr_t) p,
PWAIT|PCATCH, "procfs", 0))
return error;

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_note.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_note.c,v 1.2 1994/01/20 21:23:06 ws Exp $
* $Id: procfs_note.c,v 1.3 1994/05/04 03:42:19 cgd Exp $
*/
#include <sys/param.h>
@ -113,7 +113,7 @@ pfs_donote(curp, p, pfs, uio)
mask = p->p_sig & ~p->p_sigmask;
if (p->p_flag&SPPWAIT)
if (p->p_flag&P_PPWAIT)
mask &= ~stopsigmask;
if (mask == 0)
return 0;

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_regs.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_regs.c,v 1.4 1994/04/12 02:55:52 cgd Exp $
* $Id: procfs_regs.c,v 1.5 1994/05/04 03:42:21 cgd Exp $
*/
#include <sys/param.h>
@ -95,7 +95,7 @@ procfs_validregs(procp)
struct proc *procp;
{
#if defined(PT_SETREGS) || defined(PT_GETREGS)
return ((procp->p_flag & SSYS) == 0);
return ((procp->p_flag & P_SYSTEM) == 0);
#else
return (0);
#endif

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_status.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_status.c,v 1.3 1994/01/10 20:47:39 ws Exp $
* $Id: procfs_status.c,v 1.4 1994/05/04 03:42:22 cgd Exp $
*/
#include <sys/param.h>
@ -86,7 +86,7 @@ pfs_dostatus(curp, p, pfs, uio)
ps += strlen(ps);
ps += sprintf(ps, " %d %d %d %d ", pid, ppid, pgid, sid);
if ((p->p_flag&SCTTY) && (tp = sess->s_ttyp))
if ((p->p_flag&P_CONTROLT) && (tp = sess->s_ttyp))
ps += sprintf(ps, "%d,%d ", major(tp->t_dev), minor(tp->t_dev));
else
ps += sprintf(ps, "%d,%d ", -1, -1);
@ -103,7 +103,7 @@ pfs_dostatus(curp, p, pfs, uio)
if (*sep != ',')
ps += sprintf(ps, "noflags");
if (p->p_stat & SLOAD)
if (p->p_stat & P_INMEM)
ps += sprintf(ps, " %d %d",
p->p_stats->p_start.tv_sec,
p->p_stats->p_start.tv_usec);

View File

@ -1 +1 @@
revision 1.19 intentionally removed
revision 1.20 intentionally removed

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ptrace.h 7.4 (Berkeley) 2/22/91
* $Id: ptrace.h,v 1.12 1994/02/03 20:12:18 pk Exp $
* $Id: ptrace.h,v 1.13 1994/05/04 03:42:34 cgd Exp $
*/
#ifndef _SYS_PTRACE_H_
@ -80,9 +80,9 @@ int process_set_pc __P((struct proc *p, u_int addr));
/* do a single-stepping fixup, if needed */
#define FIX_SSTEP(p) { \
if ((p)->p_flag & SSSTEP) { \
if ((p)->p_flag & P_SSTEP) { \
process_fix_sstep(p); \
(p)->p_flag &= ~SSSTEP; \
(p)->p_flag &= ~P_SSTEP; \
} \
}
#else /* KERNEL */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)signalvar.h 7.1 (Berkeley) 5/9/91
* $Id: signalvar.h,v 1.6 1994/01/20 21:23:19 ws Exp $
* $Id: signalvar.h,v 1.7 1994/05/04 03:42:35 cgd Exp $
*/
#ifndef _SYS_SIGNALVAR_H_
@ -81,8 +81,8 @@ struct sigacts {
*/
#define CURSIG(p) \
(((p)->p_sig == 0 || \
((p)->p_flag&STRC) == 0 && ((p)->p_sig &~ (p)->p_sigmask) == 0) ? \
0 : issig(p))
((p)->p_flag&P_TRACED) == 0 && \
((p)->p_sig &~ (p)->p_sigmask) == 0) ? 0 : issig(p))
/*
* Clear a pending signal from a process.

View File

@ -1 +1 @@
revision 1.19 intentionally removed
revision 1.20 intentionally removed

View File

@ -327,7 +327,7 @@ loop:
pp = NULL;
ppri = INT_MIN;
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt)
if (p->p_stat == SRUN && (p->p_flag & SLOAD) == 0) {
if (p->p_stat == SRUN && (p->p_flag & P_INMEM) == 0) {
pri = p->p_time + p->p_slptime - p->p_nice * 8;
if (pri > ppri) {
pp = p;
@ -365,7 +365,7 @@ noswap:
(void) splclock();
if (p->p_stat == SRUN)
setrq(p);
p->p_flag |= SLOAD;
p->p_flag |= P_INMEM;
(void) spl0();
p->p_time = 0;
goto loop;
@ -390,7 +390,8 @@ noswap:
}
#define swappable(p) \
(((p)->p_flag & (SSYS|SLOAD|SKEEP|SWEXIT|SPHYSIO)) == SLOAD)
(((p)->p_flag & (P_SYSTEM|P_INMEM|P_NOSWAP|P_WEXIT|P_PHYSIO)) == \
P_INMEM)
/*
* Swapout is driven by the pageout daemon. Very simple, we find eligible
@ -498,7 +499,7 @@ swapout(p)
pmap_collect(vm_map_pmap(&p->p_vmspace->vm_map));
#endif
(void) splhigh();
p->p_flag &= ~SLOAD;
p->p_flag &= ~P_INMEM;
if (p->p_stat == SRUN)
remrq(p);
(void) spl0();

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_meter.c 7.11 (Berkeley) 4/20/91
* $Id: vm_meter.c,v 1.9 1994/01/28 04:50:47 cgd Exp $
* $Id: vm_meter.c,v 1.10 1994/05/04 03:42:44 cgd Exp $
*/
#include <sys/param.h>
@ -83,7 +83,7 @@ vmtotal()
total.t_sl = 0;
total.t_sw = 0;
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
if (p->p_flag & SSYS)
if (p->p_flag & P_SYSTEM)
continue;
if (p->p_stat) {
switch (p->p_stat) {
@ -93,12 +93,7 @@ vmtotal()
nrun++;
/* fall through */
case SSTOP:
#ifdef notdef
if (p->p_flag & SPAGE)
total.t_pw++;
else
#endif
if (p->p_flag & SLOAD) {
if (p->p_flag & P_INMEM) {
if (p->p_pri <= PZERO)
total.t_dw++;
else if (p->p_slptime < maxslp)
@ -112,7 +107,7 @@ vmtotal()
case SRUN:
case SIDL:
nrun++;
if (p->p_flag & SLOAD)
if (p->p_flag & P_INMEM)
total.t_rq++;
else
total.t_sw++;