Major - P3
It should be possible provide implementations of the following section of gcc.h in terms of C11 intrinsics given a sufficiently new version of GCC:
Doing so would make the code more portable. In particular, we would like to be able to target both -march=z9-109 -mtune=z10 and -march=z196 -mtune=zEC12 in MongoDB 3.4, which have different barrier instructions, but there is no preprocessor define which distinguishes these settings.
We would need to find the appropriate incantation for each of
The following table contains a proposed mapping from the x86 primitives to the C11 equivalent.
These seem to be the only options, in terms of API calls, because all of the other C11 atomic operations act on specific memory addresses - only atomic_signal_fence and atomic_thread_fence do not.