Added distinction between armv8 base and main

This commit is contained in:
Emil Fresk 2019-08-11 18:45:41 +02:00
parent 24ffc4a399
commit 14cef0fbc3
3 changed files with 6 additions and 4 deletions

View File

@ -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(())

View File

@ -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> {}

View File

@ -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) => {