Subject: Re: struct msgbuf contents.
To: Simon Burge <simonb@netbsd.org>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 06/14/2000 10:39:50
simonb@netbsd.org (Simon Burge) writes:
> So, is there (still?) anyone against using 32 bit ints inside struct
> msgbuf on all ports?

Well, it's pretty much always bogus to used fixed-size types except in
well-defined cases, of which 'kernel structures' is not one ... but
what you're proposing is to turn msgbuf into a structure used by a
protocol.  I'm not particularly keen on it, but it seems like you've
little choice at this point.

> 
> Looking the other way, almost all info that gets written to the message
> buffer is also dumped on the console (right?), so even on the slowest
> machines incrementing a 64 bit int should be orders of magnitudes faster
> than writing a byte to the console.  So this could be one application
> with the speed isn't (so) important...

uh, a console may just be a single address in memory, or a ring
buffer...  The guts of printf() can be much more expensive.  8-)



cgd