Skip to content

Commit

Permalink
Merge pull request #389 from rust-embedded/remove-spin
Browse files Browse the repository at this point in the history
Minor cleanups
  • Loading branch information
Dirbaio authored Oct 20, 2023
2 parents 4efc8df + b7a65ef commit 357f82c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 38 deletions.
31 changes: 6 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,13 @@ atomic-polyfill = { version = "1.0.1", optional = true }

[dependencies]
hash32 = "0.3.0"
serde = { version = "1", optional = true, default-features = false }
stable_deref_trait = { version = "1", default-features = false }
ufmt-write = { version = "0.1", optional = true }
defmt = { version = ">=0.2.0,<0.4", optional = true }

[target.'cfg(target_arch = "x86_64")'.dependencies]
spin = "0.9.4"

[dependencies.serde]
version = "1"
optional = true
default-features = false

[dependencies.stable_deref_trait]
version = "1"
default-features = false

[dependencies.ufmt-write]
version = "0.1"
optional = true

[dev-dependencies.ufmt]
version = "0.1"

[dependencies.defmt]
version = ">=0.2.0,<0.4"
optional = true

[build-dependencies]
rustc_version = "0.4.0"
[dev-dependencies]
ufmt = { version = "0.1" }

[package.metadata.docs.rs]
all-features = true
9 changes: 0 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ use std::{
process::{Command, ExitStatus, Stdio},
};

use rustc_version::Channel;

fn main() -> Result<(), Box<dyn Error>> {
let target = env::var("TARGET")?;

Expand Down Expand Up @@ -90,13 +88,6 @@ fn main() -> Result<(), Box<dyn Error>> {
}
}

if !matches!(
rustc_version::version_meta().unwrap().channel,
Channel::Stable | Channel::Beta
) {
println!("cargo:rustc-cfg=unstable_channel");
}

match compile_probe(ARM_LLSC_PROBE) {
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
_ => {}
Expand Down
4 changes: 0 additions & 4 deletions tests/tsan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ fn twice() {
}

#[test]
#[cfg(unstable_channel)]
fn scoped() {
let mut rb: spsc::Queue<i32, 5> = spsc::Queue::new();

Expand All @@ -75,7 +74,6 @@ fn scoped() {

#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn contention() {
const N: usize = 1024;

Expand Down Expand Up @@ -121,7 +119,6 @@ fn contention() {

#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn mpmc_contention() {
use std::sync::mpsc;

Expand Down Expand Up @@ -172,7 +169,6 @@ fn mpmc_contention() {

#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn unchecked() {
const N: usize = 1024;

Expand Down

0 comments on commit 357f82c

Please sign in to comment.