Subject: Re: ppsratecheck(9)
To: None <firstname.lastname@example.org>
From: Atsushi Onoe <email@example.com>
Date: 07/07/2000 15:24:36
Though these are not the point,
> >*curpps and maxpps should be unsigned.
> maybe, maybe not. anyone care about more than 2^31 events?
> if really so, long or u_long.
If you think it never occur, you might make wrap-around check to be
> >splclock() should only protect reference to mono_time, not whole the
> >mono_time should be cached at the beginning of the function.
> i took this part from ratecheck(9).
Hmm, it would be better also fix ratecheck(9). Trying to minimize the
protected region is always a good idea if there are no overhead, IMHO.
> >delta might be negative if administrator reset the date by hand.
> i don't think so.
> (1) mono_time will never go back. mono_time(9).
OK. I misunderstood.
> >Since *curpps should be unsigned, this would be
> > if (*curpps + 1 != 0)
> if (*curpps + 1 > *curpps) should do for both signed and unsigned.
Again, ommiting this check would be harmless in practice. Just comparing
to zero looks slightly lighter for me (at least on some platforms), though
won't affect the total performance at all.