From 2c42463205dae7e38535fb18f58e872df99e125a Mon Sep 17 00:00:00 2001 From: Zheng Li <875543533@qq.com> Date: Sat, 2 Mar 2024 00:21:56 +0100 Subject: [PATCH] executor: remove portable-atomic for riscv. --- embassy-executor/Cargo.toml | 5 ++--- embassy-executor/src/arch/riscv32.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml index 409df0d75..431165cee 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml @@ -40,8 +40,7 @@ critical-section = "1.1" document-features = "0.2.7" -# needed for riscv and avr -# remove when https://github.com/rust-lang/rust/pull/114499 lands on stable (on 1.76) +# needed for AVR portable-atomic = { version = "1.5", optional = true } # arch-cortex-m dependencies @@ -78,7 +77,7 @@ arch-std = ["_arch", "critical-section/std"] ## Cortex-M arch-cortex-m = ["_arch", "dep:cortex-m"] ## RISC-V 32 -arch-riscv32 = ["_arch", "dep:portable-atomic"] +arch-riscv32 = ["_arch"] ## WASM arch-wasm = ["_arch", "dep:wasm-bindgen", "dep:js-sys"] ## AVR diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs index c56f502d3..01e63a9fd 100644 --- a/embassy-executor/src/arch/riscv32.rs +++ b/embassy-executor/src/arch/riscv32.rs @@ -6,9 +6,9 @@ pub use thread::*; #[cfg(feature = "executor-thread")] mod thread { use core::marker::PhantomData; + use core::sync::atomic::{AtomicBool, Ordering}; pub use embassy_executor_macros::main_riscv as main; - use portable_atomic::{AtomicBool, Ordering}; use crate::{raw, Spawner};