Skip to content

Commit

Permalink
Rollup merge of rust-lang#65214 - Amanieu:cfg_atomic, r=alexcrichton
Browse files Browse the repository at this point in the history
Split non-CAS atomic support off into target_has_atomic_load_store

This PR implements my proposed changes in rust-lang#32976 (comment) by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s:

* `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations).
* ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS).

cc rust-lang#32976

r? @alexcrichton
  • Loading branch information
Centril committed Oct 13, 2019
2 parents aa2ae56 + dfe76a1 commit 82add0f
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 98 deletions.
2 changes: 1 addition & 1 deletion src/liballoc/lib.rs
Expand Up @@ -153,7 +153,7 @@ mod boxed {
#[cfg(test)]
mod tests;
pub mod collections;
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
#[cfg(target_has_atomic = "ptr")]
pub mod sync;
pub mod rc;
pub mod raw_vec;
Expand Down

0 comments on commit 82add0f

Please sign in to comment.