Skip to content

Commit

Permalink
Added armv8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
korken89 committed Aug 11, 2019
1 parent 109cb27 commit 24ffc4a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ matrix:
rust: nightly
if: branch != master

- env: TARGET=thumbv8m.main-none-eabi
rust: nightly
if: branch != master

before_install: set -e

install:
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ 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");
}

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, test))]
#[cfg(any(armv7m, armv7r, armv8m, 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, test))]
#[cfg(any(armv7m, armv7r, armv8m, test))]
#[macro_export]
macro_rules! pool {
($(#[$($attr:tt)*])* $ident:ident: $ty:ty) => {
Expand Down

0 comments on commit 24ffc4a

Please sign in to comment.