Date: Thu, 27 Feb 2003 20:18:49 -0800
From: Marcel Moolenaar <[EMAIL PROTECTED]>
To: Mike Barcroft <[EMAIL PROTECTED]>
Cc: Nate Lawson <[EMAIL PROTECTED]>, [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Re: 64 bit endian routines
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
On Thu, Feb 27, 2003 at 10:30:58PM -0500, Mike Barcroft wrote:
> Most of these could probably be implemented in terms of the __bswap*()
> functions in <machine/endian.h>, except for vendor sources like
> openssl, and htonl and ntohl which already are. I'm not sure if there
> would be an advantage to moving the geom byte ordering functions to
> <sys/endian.h> (I guess phk didn't either).
The geom functions serve a primary purpose of dealing with random
alignment of fields. The endianness has been added later, so they
now serve a dual function. Do not unify them with byte-order only
functions.
--
Marcel Moolenaar USPA: A-39004 [EMAIL PROTECTED]
Both scsi and geom implement unaligned access functions that perform byte
ordering. I never intended to supplant them with __bswap*(). What I want
is for machine/endian.h to have functions that provide 16-64 bit endian
conversions in both aligned and unaligned access forms. After these functions
are there, I'd like us to unify use of them and remove driver-private
versions.
Is this more clear now?
-Nate
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message