Source-Changes-D archive

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

Re: CVS commit: src/sys/arch



On Tue, Aug 17, 2010 at 04:08:10PM +0100, Mindaugas Rasiukevicius wrote:
> 
> Unifying sizes of certain types up to 64-bits would be a good choice
> from engineering standpoint.  Actually measuring the overhead would
> answer whether it is worth.

Why not use a 64bit type that is the union of a 64bit number and two
32bit numbers.
A kernel that uses 32bit paddr_t would use tha approriate (for the
endianness) 32bit value, having initialised the unused half to zero.

That would remove almost everything except the structure size overhead
while maintaining binary compatibility.

(Embedding the integer type in a struct/union also makes any places
where it is used incorrectly rather more obvious.)

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index