mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-27 04:20:24 +00:00
Merge #120
120: Allow for manual opt-out of CAS features r=japaric a=jamesmunns I've been working on a bare metal platform lately that does not have CAS (specifically ARMv4 bare metal), and this is not caught by the CPU detection logic in the build.rs. This PR adds a flag that allows for manual specification to avoid CAS features. Co-authored-by: James Munns <james.munns@ferrous-systems.com>
This commit is contained in:
commit
909251de32
10
Cargo.toml
10
Cargo.toml
@ -19,6 +19,12 @@ name = "heapless"
|
||||
repository = "https://github.com/japaric/heapless"
|
||||
version = "0.5.1"
|
||||
|
||||
[features]
|
||||
default = ["cas"]
|
||||
cas = []
|
||||
# only for tests
|
||||
__trybuild = []
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
||||
scoped_threadpool = "0.1.8"
|
||||
|
||||
@ -31,7 +37,3 @@ hash32 = "0.1.0"
|
||||
version = "1"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
# only for tests
|
||||
__trybuild = []
|
@ -89,9 +89,9 @@ mod ser;
|
||||
|
||||
pub mod binary_heap;
|
||||
pub mod i;
|
||||
#[cfg(not(armv6m))]
|
||||
#[cfg(all(not(armv6m), feature = "cas"))]
|
||||
pub mod mpmc;
|
||||
#[cfg(not(armv6m))]
|
||||
#[cfg(all(not(armv6m), feature = "cas"))]
|
||||
pub mod pool;
|
||||
pub mod spsc;
|
||||
|
||||
|
@ -154,7 +154,6 @@
|
||||
//!
|
||||
//! [1]: https://static.docs.arm.com/ddi0403/eb/DDI0403E_B_armv7m_arm.pdf
|
||||
|
||||
#[cfg(not(armv6m))]
|
||||
use core::{any::TypeId, mem, sync::atomic::Ordering};
|
||||
use core::{
|
||||
cell::UnsafeCell,
|
||||
|
Loading…
x
Reference in New Issue
Block a user