a question regarding <sys/shm.h>

Robert Watson rwatson at FreeBSD.org
Wed Jan 31 11:22:21 UTC 2007


On Wed, 31 Jan 2007, Dag-Erling Smørgrav wrote:

> Pascal Hofstee <caelian at gmail.com> writes:
>> Any additional sugestions/objections are always greatly appreciated.
>
> On 32-bit platforms (i386, powerpc), int is a 32-bit signed integer while 
> size_t is a 32-bit unsigned integer.
>
> On 64-bit platforms (amd64, sparc64 etc), int is a 32-bit signed integer 
> while size_t is a 64-bit unsigned integer.
>
> In both cases, changing this structure member from int to size_t will break 
> the ABI.
>
> This doesn't mean you shouldn't do it, just that it should be done with 
> care.

If we do decide to go ahead with the ABI change, there are a number of other 
things that should be done simultaneously, such as changing the uid and gid 
fields to uid_t and gid_t.  I would very much like to see the ABI change 
happen, and the first step (breaking out kernel from user structures) has been 
done already as part of the MAC work.  The next step is to add routines that 
translate internal/external formats, which isn't hard, but requires a moderate 
pile of code to do (as well as great care :-).

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-hackers mailing list