Skip to content

Commit

Permalink
Added distinction between armv8 base and main
Browse files Browse the repository at this point in the history
  • Loading branch information
korken89 committed Aug 11, 2019
1 parent 24ffc4a commit 14cef0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down
2 changes: 1 addition & 1 deletion src/pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {}
Expand Down
2 changes: 1 addition & 1 deletion src/pool/singleton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 14cef0f

Please sign in to comment.