mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-30 05:50:29 +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"
|
repository = "https://github.com/japaric/heapless"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["cas"]
|
||||||
|
cas = []
|
||||||
|
# only for tests
|
||||||
|
__trybuild = []
|
||||||
|
|
||||||
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
||||||
scoped_threadpool = "0.1.8"
|
scoped_threadpool = "0.1.8"
|
||||||
|
|
||||||
@ -31,7 +37,3 @@ hash32 = "0.1.0"
|
|||||||
version = "1"
|
version = "1"
|
||||||
optional = true
|
optional = true
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
||||||
[features]
|
|
||||||
# only for tests
|
|
||||||
__trybuild = []
|
|
@ -89,9 +89,9 @@ mod ser;
|
|||||||
|
|
||||||
pub mod binary_heap;
|
pub mod binary_heap;
|
||||||
pub mod i;
|
pub mod i;
|
||||||
#[cfg(not(armv6m))]
|
#[cfg(all(not(armv6m), feature = "cas"))]
|
||||||
pub mod mpmc;
|
pub mod mpmc;
|
||||||
#[cfg(not(armv6m))]
|
#[cfg(all(not(armv6m), feature = "cas"))]
|
||||||
pub mod pool;
|
pub mod pool;
|
||||||
pub mod spsc;
|
pub mod spsc;
|
||||||
|
|
||||||
|
@ -154,7 +154,6 @@
|
|||||||
//!
|
//!
|
||||||
//! [1]: https://static.docs.arm.com/ddi0403/eb/DDI0403E_B_armv7m_arm.pdf
|
//! [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::{any::TypeId, mem, sync::atomic::Ordering};
|
||||||
use core::{
|
use core::{
|
||||||
cell::UnsafeCell,
|
cell::UnsafeCell,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user