Auto merge of #51953 - japaric:atomic-load-store, r=alexcrichton

enable Atomic*.{load,store} for ARMv6-M / MSP430

closes #45085

as proposed in https://github.com/rust-lang/rust/issues/45085#issuecomment-384825434

this commit adds an `atomic_cas` target option and extends the `#[cfg(target_has_atomic)]`
attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS
natively, like MSP430 and ARMv6-M.

r? @alexcrichton
This commit is contained in:
bors 2018-07-06 08:59:22 +00:00
commit 0072c95aff
9 changed files with 52 additions and 13 deletions

View file

@ -0,0 +1,5 @@
-include ../tools.mk
# The target used below doesn't support atomic CAS operations. Verify that's the case
all:
$(RUSTC) --print cfg --target thumbv6m-none-eabi | $(CGREP) -v 'target_has_atomic="cas"'

View file

@ -1,5 +0,0 @@
-include ../tools.mk
# The target used below doesn't support atomic operations. Verify that's the case
all:
$(RUSTC) --print cfg --target thumbv6m-none-eabi | $(CGREP) -v target_has_atomic