Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 1995 04:32:13 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        dillon@blob.best.net, terry@cs.weber.edu
Cc:        bugs@FreeBSD.org, davidg@Root.COM, mckusick@McKusick.COM
Subject:   Re: possible ffs_vget() race condition
Message-ID:  <199507201832.EAA04386@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>A lot of the system configuration stuff is bogus/unportable/both.  The
>use of manifest constants to do the descriptor structs in sysctl.h
>is patently bogus.

>The CTLTYPE_QUAD definition and the size variant CTLTYPE_INT are both
>rather annoying; these should be sized values, and QUAD should probably
>not be allowed at all, since 64 bit values are (as yet) intolerably
>unportable.

Enumerated or defined types are more flexible.  You can support an
arbitrary number of scalar types or type/representation pairs by
converting the values using a routine indexed by the type.

>Not to mention the use of a shift of an embeded constant '63' and a -1
>to get the RLIM_INFINITY value in resource.h.

>Instead of (~(u_quad_t)0).

The shift method has the advantage of giving the correct result :-).
You meant ((~(u_quad_t)0) >> 1).  This depends on u_quad_t being
larger than int.

Bruce



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