diff options
| author | Dániel Buga <[email protected]> | 2023-08-26 05:43:16 +0200 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2023-08-26 12:53:39 +0200 |
| commit | 54e2e17520e678eb5f57661222670f7d891f1810 (patch) | |
| tree | fd7c90ae74c1622bac788bcce4fa224d4b788615 | |
| parent | 8339423a2f194d31f3f26d956f68dfcef46f8891 (diff) | |
Avoid dead code warning
| -rw-r--r-- | embassy-executor/src/arch/cortex_m.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs index 0806a22ab..fde862f3c 100644 --- a/embassy-executor/src/arch/cortex_m.rs +++ b/embassy-executor/src/arch/cortex_m.rs | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | const THREAD_PENDER: usize = usize::MAX; | ||
| 2 | |||
| 3 | #[export_name = "__pender"] | 1 | #[export_name = "__pender"] |
| 4 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] | 2 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] |
| 5 | fn __pender(context: *mut ()) { | 3 | fn __pender(context: *mut ()) { |
| @@ -48,13 +46,14 @@ fn __pender(context: *mut ()) { | |||
| 48 | pub use thread::*; | 46 | pub use thread::*; |
| 49 | #[cfg(feature = "executor-thread")] | 47 | #[cfg(feature = "executor-thread")] |
| 50 | mod thread { | 48 | mod thread { |
| 49 | pub(super) const THREAD_PENDER: usize = usize::MAX; | ||
| 50 | |||
| 51 | use core::arch::asm; | 51 | use core::arch::asm; |
| 52 | use core::marker::PhantomData; | 52 | use core::marker::PhantomData; |
| 53 | 53 | ||
| 54 | #[cfg(feature = "nightly")] | 54 | #[cfg(feature = "nightly")] |
| 55 | pub use embassy_macros::main_cortex_m as main; | 55 | pub use embassy_macros::main_cortex_m as main; |
| 56 | 56 | ||
| 57 | use crate::arch::THREAD_PENDER; | ||
| 58 | use crate::{raw, Spawner}; | 57 | use crate::{raw, Spawner}; |
| 59 | 58 | ||
| 60 | /// Thread mode executor, using WFE/SEV. | 59 | /// Thread mode executor, using WFE/SEV. |
