Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Sep 2001 18:20:00 -0400
From:      Mike Barcroft <mike@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Bruce Evans <bde@zeta.org.au>, John Baldwin <jhb@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys proc.h
Message-ID:  <20010927182000.A12254@coffee.q9media.com>
In-Reply-To: <Pine.BSF.4.21.0109271531150.65838-100000@InterJet.elischer.org>; from julian@elischer.org on Thu, Sep 27, 2001 at 03:38:22PM -0700
References:  <200109272039.f8RKdrn08189@freefall.freebsd.org> <Pine.BSF.4.21.0109271531150.65838-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer <julian@elischer.org> writes:
> Pitty:
> 
> I think 
>         pid_t           p_oppid;        /* (c + e) Save ppid in ptrace.*/
>         struct vmspace  *p_vmspace;     /* (b) Address space. */
>         u_int           p_swtime;       /* (j) Time swapped in or out. */
>         struct itimerval p_realtimer;   /* (h?/k?) Alarm timer. */
>         u_int64_t       p_runtime;      /* (j) Real time in microsec. */
>         int             p_traceflag;    /* (j?) Kernel trace points. */
>         struct vnode    *p_tracep;      /* (j?) Trace to vnode. */
>         sigset_t        p_siglist;      /* (c) Sigs arrived, notdelivered. */
>         struct vnode    *p_textvp;      /* (b) Vnode of executable. */
>         struct mtx      p_mtx;          /* (k) Lock for this struct. */
>         char            p_lock;         /* (c) Proclock count. */
>         struct  klist   p_klist;        /* (c) Knotes to this proc. */
>         struct sigiolst p_sigiolst;     /* (c) List of sigio sources. */
>         int             p_sigparent;    /* (c) Signal to parent onexit. */
>         sigset_t        p_oldsigmask;   /* (c) Saved mask from presigpause. */
>         int             p_sig;          /* (n) For core dump/debugger*/
>         u_long          p_code;         /* (n) For core dump/debugger*/
>         u_int           p_stops;        /* (c) Procfs event bitmask. */
>         u_int           p_stype;        /* (c) Procfs stop event type. */
>         char            p_step;         /* (c) Procfs stop *once* flag. */
>         u_char          p_pfsflags;     /* (c) Procfs flags. */
>         struct nlminfo  *p_nlminfo;     /* (?) only used by/for lockd */
> 
> 
> is more readable than
> 
> #define p_startzero     p_oppid
>         pid_t   p_oppid;                /* (c + e) Save ppid in ptrace.*/
>         struct  vmspace *p_vmspace;     /* (b) Address space. */
>         u_int   p_swtime;               /* (j) Time swapped in or out. */
>         struct  itimerval p_realtimer;  /* (h?/k?) Alarm timer. */
>         u_int64_t       p_runtime;      /* (j) Real time in microsec. */
>         int     p_traceflag;            /* (j?) Kernel trace points. */
>         struct  vnode *p_tracep;        /* (j?) Trace to vnode. */
>         sigset_t        p_siglist;      /* (c) Sigs arrived, notdelivered. */
>         struct  vnode *p_textvp;        /* (b) Vnode of executable. */
>         struct  mtx p_mtx;              /* (k) Lock for this struct. */
>         char    p_lock;                 /* (c) Proclock count. */
>         struct  klist p_klist;          /* (c) Knotes to this proc. */
>         struct  sigiolst p_sigiolst;    /* (c) List of sigio sources. */
>         int     p_sigparent;            /* (c) Signal to parent onexit. */
>         sigset_t        p_oldsigmask;   /* (c) Saved mask from presigpause. */
>         int     p_sig;                  /* (n) For core dump/debugge */
>         u_long  p_code;                 /* (n) For core dump/debugge */
>         u_int   p_stops;                /* (c) Procfs event bitmask. */
>         u_int   p_stype;                /* (c) Procfs stop event type. */
>         char    p_step;                 /* (c) Procfs stop *once* flag. */
>         u_char  p_pfsflags;             /* (c) Procfs flags. */
>         struct  nlminfo *p_nlminfo;     /* (?) Only used by/for lockd. */

Agreed.  I don't think the purpose of style(9) is to make code less
readable/extremely ugly.  I believe most BSD code does something more
along the lines of:
	pid_t		p_oppid;	/* (c + e) Save ppid in ptrace. */
	struct vmspace *p_vmspace;	/* (b) Address space. */
	u_int		p_swtime;	/* (j) Time swapped in or out. */

Best regards,
Mike Barcroft

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010927182000.A12254>