From owner-freebsd-threads@FreeBSD.ORG Wed Dec 21 15:17:05 2011 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE0E106566B; Wed, 21 Dec 2011 15:17:05 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 22B1F8FC0C; Wed, 21 Dec 2011 15:17:05 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id F3E276A17; Wed, 21 Dec 2011 15:16:58 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id B1A6980C9; Wed, 21 Dec 2011 16:16:58 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "O. Hartmann" References: <58923.1324292241@critter.freebsd.dk> <4EEF765D.4090300@zedat.fu-berlin.de> Date: Wed, 21 Dec 2011 16:16:58 +0100 In-Reply-To: <4EEF765D.4090300@zedat.fu-berlin.de> (O. Hartmann's message of "Mon, 19 Dec 2011 18:37:33 +0100") Message-ID: <868vm6t0np.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: threads@freebsd.org, Poul-Henning Kamp , Warner Losh , freebsd-arch@freebsd.org Subject: Re: [Patch] C1X threading support X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:17:05 -0000 "O. Hartmann" 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 --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no