This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM 64 bit atomics


On Wed, 29 Jun 2011, Joseph S. Myers wrote:

> Note that C1X requires atomic operations on types of any size - 
> structures, for example - with the assumption that locks (based on hashes 
> of the address, maybe) will be used implicitly (and facilities in 
> stdatomic.h to report whether operations on a given object will be 
> lock-free).  If other architectures without native 64-bit atomics end up 
> using some implicit locking scheme for 64-bit atomics we don't want ARM to 
> do something different from all other architectures.

I should add: it's also necessary to avoid locked operations in code built 
for an older architecture failing to interact correctly with code built 
for a newer architecture that can do those operations inline.  There was a 
lengthy discussion of this on gcc and libc-alpha (Aug 2009); if 64-bit 
atomics can be used inline, it may be necessary to force locked 64-bit 
atomics for older architectures through a system-provided library such as 
the vDSO that can use the right instructions on newer libraries.  But this 
needs to be done in the same way on all architectures as far as possible 
to avoid even more confusion....

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]