Provide implementations of atomic operations for ARM/GCC.
More...
- Outline
-
-
- Purpose:
- Provide implementations of atomic operations for ARM/GCC.
-
- Classes:
bsls::AtomicOperations_ARM_ALL_GCC | implementation of atomics for ARM/GCC. |
-
- Description:
- This component provides classes necessary to implement atomics on the Linux ARM platform with GCC. The classes are for private use only. See
bsls_atomicoperations
and bsls_atomic
for the public interface to atomics.
- IMPLEMENTATION NOTES: Wherever possible we use atomic intrinsics that both GCC 4.6+ and Clang 3.2+ support. Otherwise the inline assembly code is used that can be compiled both by GCC and Clang. This puts some restrictions on the assembly code because Clang doesn't support register pairs that represent a 64bit value. So instead of
ldrexd 1, H1, [3]
the exact registers have to be specified, as in ldrexd r2, r3, [3]
. Note also that operations like ldrexd
and stdrexd
are supported only starting from armv6zk
, so not every armv6 platform will work.
- For more details on ARM atomic primitives see the Linux kernel source code (arch/arm/include/asm/atomic.h) and the "C/C++11 mappings to processors" (http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html), and the "ARM1156T2F-S Technical Reference Manual" (http://infocenter.arm.com/help/index.jsp? topic=/com.arm.doc.ddi0290g/Babebdcb.html), which contains documentation on the p15 coprocessor opcodes used in this component).