Don't require 16-byte CAS on x86. (#173)

* Don't require 16-byte CAS on x86.

We only need to CAS 2 pointers, which is always possible on x86.

* Fix the way the Image variable is referenced.

* Replace failOnStderr by `set -eo pipefail` on Linux.

The x86 image doesn't have clangformat, which causes cmake to print a
warning on the stderr. Exit codes should be enough to detect failure.

* Use x86 images from snmallocciteam.

* clang-format
This commit is contained in:
Paul Liétar
2020-04-16 08:33:02 +02:00
committed by GitHub
parent 2b92574123
commit 0f5cc165e8
3 changed files with 49 additions and 14 deletions

View File

@@ -99,9 +99,11 @@ namespace snmalloc
(__int64)value,
(__int64*)&old);
# else
# if defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
# if defined(__GNUC__) && defined(SNMALLOC_VA_BITS_64) && \
!defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
#error You must compile with -mcx16 to enable 16-byte atomic compare and swap.
# endif
Linked xchg{value, old.aba + 1};
std::atomic<Linked>& addr = parent->linked;