summaryrefslogtreecommitdiff
path: root/src/mongo/platform/atomic_intrinsics_gcc_generic.h
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-13264 Move Apache-licensed files to AGPLIan Whalen2014-05-161-9/+21
| | | | Also update generators.
* SERVER-12064 Atomic operations for gcc non-Intel architecturesRobie Basak2014-01-071-0/+70
Add support for non-Intel architectures by using gcc builtins where possible, but only on non-Intel builds. This permits builds to continue to work on Intel architectures even with older gcc versions that do not have the builtins. atomic_intrinsics_gcc.h contains non-portable Intel assembly, so move it to atomic_intrinsics_gcc_intel.h and add an atomic_intrinsics_gcc_generic.h equivalent that uses only modern gcc builtins. Adjust atomic_intrinsics.h to use atomic_intrinsics_gcc_intel.h in the Intel case, and atomic_instrinsics_gcc_generic.h in an additional "otherwise" case. This does not change behaviour or compatibility in the common IA-32 and x86_64 cases. The previously existing code will continue to be used in these cases. An older gcc without the modern gcc builtins will continue to be able to build on these architectures because the previously existing assembly will be used. This does make this code fully portable to any architecture supported by a modern gcc, since the new, generic code will be used in this case.