diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-08-26 11:05:03 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-26 11:05:03 +0000 |
| commit | ca738d6c99cb72fc32d012f99af4254d6c6312ed (patch) | |
| tree | eca25c894dd6b661f59608b333933fd48965d9ed | |
| parent | f8299d10f7c0387416989e00acc02d99661537fb (diff) | |
| parent | d33246b072f222bd221471da7d498593ef8c6211 (diff) | |
Merge pull request #1826 from bugadani/warn
Avoid dead code warning
| -rwxr-xr-x | ci.sh | 13 | ||||
| -rw-r--r-- | embassy-executor/src/arch/cortex_m.rs | 5 |
2 files changed, 15 insertions, 3 deletions
| @@ -19,6 +19,19 @@ cargo batch \ | |||
| 19 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,log \ | 19 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,log \ |
| 20 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \ | 20 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \ |
| 21 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ | 21 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ |
| 22 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt,arch-cortex-m,executor-thread,executor-interrupt,integrated-timers \ | ||
| 23 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m \ | ||
| 24 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,integrated-timers \ | ||
| 25 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-thread \ | ||
| 26 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-thread,integrated-timers \ | ||
| 27 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-interrupt \ | ||
| 28 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-interrupt,integrated-timers \ | ||
| 29 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-thread,executor-interrupt \ | ||
| 30 | --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,arch-cortex-m,executor-thread,executor-interrupt,integrated-timers \ | ||
| 31 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features nightly,arch-riscv32 \ | ||
| 32 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features nightly,arch-riscv32,integrated-timers \ | ||
| 33 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features nightly,arch-riscv32,executor-thread \ | ||
| 34 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features nightly,arch-riscv32,executor-thread,integrated-timers \ | ||
| 22 | --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ | 35 | --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ |
| 23 | --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \ | 36 | --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \ |
| 24 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \ | 37 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \ |
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. |
