BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bsls_atomicoperations_powerpc_all_gcc

Provide implementations of atomic operations for gcc on PowerPC.

Outline

Purpose

Provide implementations of atomic operations for gcc on PowerPC

Classes

Description

This component provides classes necessary to implement atomics on the PowerPC platform in 32bit/64bit mode with the GCC compiler. The classes are for private use only. See bsls_atomicoperations and bsls_atomic for the public interface to atomics.

bsls_atomicoperations_all_all_gccintrinsics.h is used for gcc 4.7+ and provides C++11 atomics. The implementation herein is intended for earlier versions of gcc and will work correctly for 64-bit programs, as well as for 32-bit programs on AIX 6 or better, where AIX kernel saves and restores 64-bit registers across context switches and interrupts, even in 32-bit programs. According to IBM developers, this guarantee is not provided by the 32-bit ABI when running Linux kernel on POWER hardware, and therefore 64-bit atomic operations using gcc __sync_* intrinsics might not operate properly in some circumstances on Linux on POWER. If running on Linux on POWER, it is highly recommended that gcc 4.7+ be used, such as the IBM Advanced Toolchain (AT) which currently provides gcc 4.8.3 for POWER, or the RedHat Developer Toolset (DTS) for POWER.

IMPLEMENTATION NOTE: there are likely excess explicit barriers since gcc __sync_* intrinsics may provide their own barriers