executor: remove portable-atomic for riscv.

This commit is contained in:
Zheng Li 2024-03-02 00:21:56 +01:00 committed by Dario Nieuwenhuis
parent 3b9b44ea99
commit 2c42463205
2 changed files with 3 additions and 4 deletions

View File

@ -40,8 +40,7 @@ critical-section = "1.1"
document-features = "0.2.7" document-features = "0.2.7"
# needed for riscv and avr # needed for AVR
# remove when https://github.com/rust-lang/rust/pull/114499 lands on stable (on 1.76)
portable-atomic = { version = "1.5", optional = true } portable-atomic = { version = "1.5", optional = true }
# arch-cortex-m dependencies # arch-cortex-m dependencies
@ -78,7 +77,7 @@ arch-std = ["_arch", "critical-section/std"]
## Cortex-M ## Cortex-M
arch-cortex-m = ["_arch", "dep:cortex-m"] arch-cortex-m = ["_arch", "dep:cortex-m"]
## RISC-V 32 ## RISC-V 32
arch-riscv32 = ["_arch", "dep:portable-atomic"] arch-riscv32 = ["_arch"]
## WASM ## WASM
arch-wasm = ["_arch", "dep:wasm-bindgen", "dep:js-sys"] arch-wasm = ["_arch", "dep:wasm-bindgen", "dep:js-sys"]
## AVR ## AVR

View File

@ -6,9 +6,9 @@ pub use thread::*;
#[cfg(feature = "executor-thread")] #[cfg(feature = "executor-thread")]
mod thread { mod thread {
use core::marker::PhantomData; use core::marker::PhantomData;
use core::sync::atomic::{AtomicBool, Ordering};
pub use embassy_executor_macros::main_riscv as main; pub use embassy_executor_macros::main_riscv as main;
use portable_atomic::{AtomicBool, Ordering};
use crate::{raw, Spawner}; use crate::{raw, Spawner};