Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2001 07:23:02 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, current@FreeBSD.ORG, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, Robert Drehmel <robert@gizmo.quizbot.org>
Subject:   Re: Atomic breakage?
Message-ID:  <20010118072302.E98607@gsmx07.alcatel.com.au>
In-Reply-To: <XFMail.010117102803.jhb@FreeBSD.org>; from jhb@FreeBSD.ORG on Wed, Jan 17, 2001 at 10:28:03AM -0800
References:  <53512.979753444@critter> <XFMail.010117102803.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2001-Jan-17 10:28:03 -0800, John Baldwin <jhb@FreeBSD.ORG> wrote:
>  So as long as we keep all
>atomically-accessed 64-bit integers within a single page we should be fine for
>CX8 on all pentiums should we even want 64-bit atomic ops.

This comes free of charge (along with better performance) if all
64-bit objects are aligned on 8-byte boundaries.  By default our gcc
only enforces long (4-byte) alignment (apparently, this is part of the
IA32 ABI).  We can get 8-byte alignment by adding
"__attribute__((aligned(8)))" to the object definition.

This is one area where I think we would be better off changing our
gcc to default to aligning "long long" (and maybe "double") at
8-byte boundaries.

We should at least have an alignment expansion in <sys/cdefs.h>

Peter



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010118072302.E98607>