remove unused mod, use portable-atomic unconditionally (#995)

This commit is contained in:
Scott Mabin 2023-12-04 15:40:39 +00:00 committed by GitHub
parent 05f9d2109a
commit 810d849dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 17 deletions

View File

@ -6,13 +6,9 @@ use embassy_executor::{raw, SendSpawner};
use peripherals::INTPRI as SystemPeripheral;
#[cfg(not(any(esp32c6, esp32h2)))]
use peripherals::SYSTEM as SystemPeripheral;
use portable_atomic::{AtomicUsize, Ordering};
use crate::{
atomic::{AtomicUsize, Ordering},
get_core,
interrupt,
peripherals,
};
use crate::{get_core, interrupt, peripherals};
static FROM_CPU_IRQ_USED: AtomicUsize = AtomicUsize::new(0);

View File

@ -2,12 +2,9 @@
use core::marker::PhantomData;
use embassy_executor::{raw, Spawner};
use portable_atomic::{AtomicBool, Ordering};
use crate::{
atomic::{AtomicBool, Ordering},
get_core,
prelude::interrupt,
};
use crate::{get_core, prelude::interrupt};
#[cfg(multi_core)]
use crate::{
interrupt,

View File

@ -161,11 +161,6 @@ pub mod trapframe {
// be directly exposed.
mod soc;
#[allow(unused_imports)]
mod atomic {
pub use portable_atomic::*;
}
#[no_mangle]
extern "C" fn EspDefaultHandler(_level: u32, _interrupt: peripherals::Interrupt) {
#[cfg(feature = "log")]
@ -322,7 +317,7 @@ mod critical_section_impl {
#[cfg(multi_core)]
mod multicore {
use crate::atomic::{AtomicUsize, Ordering};
use portable_atomic::{AtomicUsize, Ordering};
// We're using a value that we know get_raw_core() will never return. This
// avoids an unnecessary increment of the core ID.