tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A simple cpufreq(9)



On Thu, Sep 29, 2011 at 11:42:07AM +1000, matthew green wrote:
 > > > > Why advertise uint16_t, are we trying to save memory? I would just do
 > > > > them uint32_t...
 > > > 
 > > > While few things are certain in computing, I don't think we are going to
 > > > see a 65535 MHz processor any time soon. But sure, uint32_t is fine too.
 > > 
 > > Why not just "unsigned"? There doesn't seem to be any reason to size
 > > it explicitly...
 > 
 > for user/kernel APIs we try to use fixed-sized types and structures
 > so that 32/64 bit compat issues are elided.

...and "unsigned" is the same in both ILP32 and LP64 worlds :-)

I mean, I see the point, but it seems like overkill.

If that periodically-threatened pdp10 port (or some other off-size
port) ever appears, it's not likely to care about the size that
appears in some other environment (unlike for on-disk structures) and
using an explicit size will if anything make life more complicated.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index