Subject: Re: struct msgbuf contents.
To: Simon Burge <simonb@NetBSD.ORG>
From: Chris G. Demetriou <>
List: tech-kern
Date: 06/14/2000 17:02:59
Simon Burge <simonb@NetBSD.ORG> writes:
> My plan was to add a sysctl that returns 'struct msgbuf' plus the buffer
> after that.  Since we already have a sysctl to return the message buffer
> length, what about a separate sysctl that returns just the contents of
> the buffer, rearranged if the buffer currently wraps.  This way userland
> doesn't need to know about 'strcut msgbuf' at all.
> Does this sound like a more reasonable solution?

This is probably a good thing, yes.

> As for re-use of the buffer with different kernel sizes, we could
> introduce a #define in <machine/types.h> for the type of the msgbuf
> components.  That way most architectures stay as "long", but
> sparc/sparc64 (and perhaps mips) can use "int64_t" or whatever they
> fancy.

If this is desirable, i guess it makes sense.  Perhaps better would be
a #define, which is used if defined but otherwise defaults to
something sane.

(I'm not that keen on proliferation of random types that most ports
don't need, but either way probably wouldn't matter much.)