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

closes #45085

this commit adds an `atomic_cas` target option and an unstable `#[cfg(target_has_atomic_cas)]`
attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS
natively, like MSP430 and ARMv6-M.
This commit is contained in:
Jorge Aparicio
2018-06-30 14:56:08 -05:00
parent 94eb176055
commit bbf688a84d
9 changed files with 45 additions and 7 deletions

View File

@@ -86,6 +86,7 @@
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(not(stage0), feature(cfg_target_has_atomic_cas))]
#![feature(coerce_unsized)]
#![feature(collections_range)]
#![feature(const_fn)]
@@ -162,7 +163,8 @@ mod boxed {
#[cfg(test)]
mod boxed_test;
pub mod collections;
#[cfg(target_has_atomic = "ptr")]
#[cfg_attr(stage0, cfg(target_has_atomic = "ptr"))]
#[cfg_attr(not(stage0), cfg(all(target_has_atomic = "ptr", target_has_atomic_cas)))]
pub mod sync;
pub mod rc;
pub mod raw_vec;