Atomics 0.0.2
Changes
-
On Linux only, support for double-wide atomics is unavailable by default on x86_64 CPUs. To enable double-wide atomic functionality, you have to manually switch on support for the
cmpxchg16b
instruction:$ swift build -Xcc -mcx16 -Xswiftc -DENABLE_DOUBLEWIDE_ATOMICS -c release
Code containing
cmpxchg16b
will run on all but the earliest AMD x86_64 CPUs. (You can verify your target CPU supports it by checking that thecx16
flag is present in /proc/cpuinfo.) -
The Swift Atomics test suite now requires
--enable-test-discovery
on non-Apple platforms.