svn commit: r255135 - head/sys/sys

Davide Italiano davide at freebsd.org
Sun Sep 1 22:38:52 UTC 2013


On Mon, Sep 2, 2013 at 12:30 AM, Davide Italiano <davide at freebsd.org> wrote:
> Author: davide
> Date: Sun Sep  1 22:30:24 2013
> New Revision: 255135
> URL: http://svnweb.freebsd.org/changeset/base/255135
>
> Log:
>   Use single underscore for all parameters name and local variables in
>   bintime_* related functions. This commit completes what was already done
>   by theraven@ for bintime_shift, and just uses a single underscore instead
>   of two (which is a style bug according to Bruce). See r251855 for reference.
>
>   Reported by:  theraven
>   Discussed with:       bde
>   Reviewed by:  bde
>

This commit should fix the namespace problem(s) but still there are
quite a few issues in time.h, as I previously privately discussed with
Bruce. Other than stylistic issues, e.g. the usage of something more
appropriate like _btp for pointers or something more explicative for
second argument in bintime_add than _bt2, the main design error is
that bintimes are pointers. This was good historically because it
avoided passing large structs in 1978, but right now (with inline)
there is little difference between using pointers and using structs,
except the latter code is easier to write and optimize.
JFYI, sbintime_t functions considers this previous "mistake" and do
not rely on pointers. At some point probably bintime might be changed
to be more similar to sbintime_t, even though this looks like a huge
change for me now.

Thanks,

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the svn-src-head mailing list