mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-26 20:10:24 +00:00
Added distinction between armv8 base and main
This commit is contained in:
parent
24ffc4a399
commit
14cef0fbc3
6
build.rs
6
build.rs
@ -13,8 +13,10 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
println!("cargo:rustc-cfg=armv7m");
|
||||
} else if target.starts_with("armv7r-") {
|
||||
println!("cargo:rustc-cfg=armv7r");
|
||||
} else if target.starts_with("thumbv8m") {
|
||||
println!("cargo:rustc-cfg=armv8m");
|
||||
} else if target.starts_with("thumbv8m.base") {
|
||||
println!("cargo:rustc-cfg=armv8m_base");
|
||||
} else if target.starts_with("thumbv8m.main") {
|
||||
println!("cargo:rustc-cfg=armv8m_main");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -183,7 +183,7 @@ pub struct Pool<T> {
|
||||
// NOTE: Here we lie about `Pool` implementing `Sync` on x86_64. This is not true but it lets us
|
||||
// test the `pool!` and `singleton::Pool` abstractions. We just have to be careful not to use the
|
||||
// pool in a multi-threaded context
|
||||
#[cfg(any(armv7m, armv7r, armv8m, test))]
|
||||
#[cfg(any(armv7m, armv7r, armv8m_main, test))]
|
||||
unsafe impl<T> Sync for Pool<T> {}
|
||||
|
||||
unsafe impl<T> Send for Pool<T> {}
|
||||
|
@ -15,7 +15,7 @@ use as_slice::{AsMutSlice, AsSlice};
|
||||
use super::{Init, Node, Uninit};
|
||||
|
||||
/// Instantiates a pool as a global singleton
|
||||
#[cfg(any(armv7m, armv7r, armv8m, test))]
|
||||
#[cfg(any(armv7m, armv7r, armv8m_main, test))]
|
||||
#[macro_export]
|
||||
macro_rules! pool {
|
||||
($(#[$($attr:tt)*])* $ident:ident: $ty:ty) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user