[Patch] C1X threading support

Dag-Erling Smørgrav des at des.no
Wed Dec 21 15:17:05 UTC 2011


"O. Hartmann" <ohartman at zedat.fu-berlin.de> writes:
> How is the other BSD sibbling, NetBSD, dealing with such things? NetBSD
> is supposed to run on a trmendous variety of hardware, even a mixture of
> bigendian and littleenddian and I'm quite sure they must have overcome
> this probleme anyway.

The same way FreeBSD does: where ordering matters, use explicit
conversions when reading and writing.  The conversion functions / macros
are defined in such a manner that unnecessary conversions (e.g. host to
little-endian on a little-endian system) do not generate any code at
all.  The only downside is that you can't directly compare variables
unless you're certain that they're both in host order.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-threads mailing list