[fedora-arm] ARMv5 and atomic operations

Nicolas Pitre nico at fluxnic.net
Mon Apr 23 14:56:45 UTC 2012


On Sun, 22 Apr 2012, Brendan Conoboy wrote:

> As we get closer to having 100% package coverage in F17-ARM we're running into
> harder build failures due to the limitations of the chips we're building for.
> The problem I've noticed on many of the recent failures is due to the lack of
> atomic operations (These didn't arrive until ARMv6).  How do we want to handle
> this?  I see a few options:

This is already handled, and has been so for the last 5 years or more.

The kernel provides user space with atomic helpers which the kernel 
knows how to replay if necessary to make the result completely "atomic".  
See Documentation/arm/kernel_user_helpers.txt in the kernel source tree 
for details and example usage.

These helpers are usually called via some libraries providing standard 
APIs and semantics.  The NPTL implementation of pthreads for ARMv5 is 
based on those helpers.  And gcc's handling of atomic types is also 
using those kernel helpers when compiling for ARMv5, or even ARMv6 
(non ARMv6k) in the 64-bit case.

So everything is there for you already to support atomic operations even 
on ARMv3 if you so wish.


Nicolas


More information about the arm mailing list