On Mon, 17 Jan 2000, Bruce Evans wrote:
> > Using the magic of :%s:p_stats->p_\([usi]\)\(u[^a-zA-Z_0-9]\):p_\1\2:g,
> > and just using vi to edit the headers too :), I submit the following to
> > you for review. I'll be testing it in its entirety tomorrow, but I'm
> > already reasonably confident this is correct. What do you think?
>
> The substitution has a good chance of being correct if it sort of works
> at all :-), except global substitions give style bugs when long lines
> become shorter, etc. About 2 lines are affected.
Nuts! :)
> > @@ -239,6 +239,9 @@
> > struct proc *p_leader;
> > struct pasleep p_asleep; /* Used by asleep()/await(). */
> > void *p_emuldata; /* process-specific emulator state data */
> > + u_int64_t p_uu; /* previous user time (us) */
> > + u_int64_t p_su; /* previous system time (us) */
> > + u_int64_t p_iu; /* previous interrupt time (us) */
> > };
> >
> > #define p_session p_pgrp->pg_session
>
> Bug: I think p_uu etc. are no longer initialized on fork. They should be
> in the zeroed section. They should be next to p_runtime and p_uticks,
> etc. for stylistic reasons.
Hm. I would think that the intuitive thing is them being initialized
to reasonable values on a fork. I must not be very intuitive *g*
>
> Moving code gives style bugs when the styles in different files are
> different. proc.h actually follows the rule about comments being filled
> like English sentences, as in the p_asleep line, except in sloppy FreeBSD
> additions like the p_emuldata line. Don't fix this. I already have.
I wasn't even aware of differences in language like that between files.
Maybe I'm too used to there being no sentence structure :)
Thank you, though! I now understand the idea of header theory a bit
better.
>
> Bruce
>
>
--
Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! /
[EMAIL PROTECTED] `------------------------------'
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message