Avoid dead code warning

This commit is contained in:
Dániel Buga 2023-08-26 05:43:16 +02:00
parent 8339423a2f
commit 54e2e17520

View File

@ -1,5 +1,3 @@
const THREAD_PENDER: usize = usize::MAX;
#[export_name = "__pender"] #[export_name = "__pender"]
#[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))]
fn __pender(context: *mut ()) { fn __pender(context: *mut ()) {
@ -48,13 +46,14 @@ fn __pender(context: *mut ()) {
pub use thread::*; pub use thread::*;
#[cfg(feature = "executor-thread")] #[cfg(feature = "executor-thread")]
mod thread { mod thread {
pub(super) const THREAD_PENDER: usize = usize::MAX;
use core::arch::asm; use core::arch::asm;
use core::marker::PhantomData; use core::marker::PhantomData;
#[cfg(feature = "nightly")] #[cfg(feature = "nightly")]
pub use embassy_macros::main_cortex_m as main; pub use embassy_macros::main_cortex_m as main;
use crate::arch::THREAD_PENDER;
use crate::{raw, Spawner}; use crate::{raw, Spawner};
/// Thread mode executor, using WFE/SEV. /// Thread mode executor, using WFE/SEV.