diff options
| author | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
|---|---|---|
| committer | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
| commit | 7976f950b0de72c521f92efa350c67ccd197fab9 (patch) | |
| tree | 8759312eb000de09b92a4921f476d5c16b7e7342 /embassy-executor/src/arch | |
| parent | 828a8df18d04877df1f55f04354980b28ff2f2f8 (diff) | |
Merge branch 'main' into 17-add-support-for-boot-protocol
Diffstat (limited to 'embassy-executor/src/arch')
| -rw-r--r-- | embassy-executor/src/arch/avr.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/cortex_ar.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/cortex_m.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/riscv32.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/spin.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/std.rs | 4 | ||||
| -rw-r--r-- | embassy-executor/src/arch/wasm.rs | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/embassy-executor/src/arch/avr.rs b/embassy-executor/src/arch/avr.rs index 70085d04d..a841afe15 100644 --- a/embassy-executor/src/arch/avr.rs +++ b/embassy-executor/src/arch/avr.rs | |||
| @@ -10,11 +10,11 @@ mod thread { | |||
| 10 | pub use embassy_executor_macros::main_avr as main; | 10 | pub use embassy_executor_macros::main_avr as main; |
| 11 | use portable_atomic::{AtomicBool, Ordering}; | 11 | use portable_atomic::{AtomicBool, Ordering}; |
| 12 | 12 | ||
| 13 | use crate::{raw, Spawner}; | 13 | use crate::{Spawner, raw}; |
| 14 | 14 | ||
| 15 | static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); | 15 | static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); |
| 16 | 16 | ||
| 17 | #[export_name = "__pender"] | 17 | #[unsafe(export_name = "__pender")] |
| 18 | fn __pender(_context: *mut ()) { | 18 | fn __pender(_context: *mut ()) { |
| 19 | SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); | 19 | SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); |
| 20 | } | 20 | } |
diff --git a/embassy-executor/src/arch/cortex_ar.rs b/embassy-executor/src/arch/cortex_ar.rs index f9e2f3f7c..a9be3d323 100644 --- a/embassy-executor/src/arch/cortex_ar.rs +++ b/embassy-executor/src/arch/cortex_ar.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #[cfg(feature = "executor-interrupt")] | 1 | #[cfg(feature = "executor-interrupt")] |
| 2 | compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`."); | 2 | compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`."); |
| 3 | 3 | ||
| 4 | #[export_name = "__pender"] | 4 | #[unsafe(export_name = "__pender")] |
| 5 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] | 5 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] |
| 6 | fn __pender(context: *mut ()) { | 6 | fn __pender(context: *mut ()) { |
| 7 | // `context` is always `usize::MAX` created by `Executor::run`. | 7 | // `context` is always `usize::MAX` created by `Executor::run`. |
| @@ -26,7 +26,7 @@ mod thread { | |||
| 26 | use cortex_ar::asm::wfe; | 26 | use cortex_ar::asm::wfe; |
| 27 | pub use embassy_executor_macros::main_cortex_ar as main; | 27 | pub use embassy_executor_macros::main_cortex_ar as main; |
| 28 | 28 | ||
| 29 | use crate::{raw, Spawner}; | 29 | use crate::{Spawner, raw}; |
| 30 | 30 | ||
| 31 | /// Thread mode executor, using WFE/SEV. | 31 | /// Thread mode executor, using WFE/SEV. |
| 32 | /// | 32 | /// |
diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs index 1c9ddd8a0..1ce96d1d5 100644 --- a/embassy-executor/src/arch/cortex_m.rs +++ b/embassy-executor/src/arch/cortex_m.rs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #[export_name = "__pender"] | 1 | #[unsafe(export_name = "__pender")] |
| 2 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] | 2 | #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] |
| 3 | fn __pender(context: *mut ()) { | 3 | fn __pender(context: *mut ()) { |
| 4 | unsafe { | 4 | unsafe { |
| @@ -53,7 +53,7 @@ mod thread { | |||
| 53 | 53 | ||
| 54 | pub use embassy_executor_macros::main_cortex_m as main; | 54 | pub use embassy_executor_macros::main_cortex_m as main; |
| 55 | 55 | ||
| 56 | use crate::{raw, Spawner}; | 56 | use crate::{Spawner, raw}; |
| 57 | 57 | ||
| 58 | /// Thread mode executor, using WFE/SEV. | 58 | /// Thread mode executor, using WFE/SEV. |
| 59 | /// | 59 | /// |
diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs index 01e63a9fd..c70c1344a 100644 --- a/embassy-executor/src/arch/riscv32.rs +++ b/embassy-executor/src/arch/riscv32.rs | |||
| @@ -10,12 +10,12 @@ mod thread { | |||
| 10 | 10 | ||
| 11 | pub use embassy_executor_macros::main_riscv as main; | 11 | pub use embassy_executor_macros::main_riscv as main; |
| 12 | 12 | ||
| 13 | use crate::{raw, Spawner}; | 13 | use crate::{Spawner, raw}; |
| 14 | 14 | ||
| 15 | /// global atomic used to keep track of whether there is work to do since sev() is not available on RISCV | 15 | /// global atomic used to keep track of whether there is work to do since sev() is not available on RISCV |
| 16 | static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); | 16 | static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); |
| 17 | 17 | ||
| 18 | #[export_name = "__pender"] | 18 | #[unsafe(export_name = "__pender")] |
| 19 | fn __pender(_context: *mut ()) { | 19 | fn __pender(_context: *mut ()) { |
| 20 | SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); | 20 | SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); |
| 21 | } | 21 | } |
diff --git a/embassy-executor/src/arch/spin.rs b/embassy-executor/src/arch/spin.rs index 340023620..49f3356a6 100644 --- a/embassy-executor/src/arch/spin.rs +++ b/embassy-executor/src/arch/spin.rs | |||
| @@ -9,9 +9,9 @@ mod thread { | |||
| 9 | 9 | ||
| 10 | pub use embassy_executor_macros::main_spin as main; | 10 | pub use embassy_executor_macros::main_spin as main; |
| 11 | 11 | ||
| 12 | use crate::{raw, Spawner}; | 12 | use crate::{Spawner, raw}; |
| 13 | 13 | ||
| 14 | #[export_name = "__pender"] | 14 | #[unsafe(export_name = "__pender")] |
| 15 | fn __pender(_context: *mut ()) {} | 15 | fn __pender(_context: *mut ()) {} |
| 16 | 16 | ||
| 17 | /// Spin Executor | 17 | /// Spin Executor |
diff --git a/embassy-executor/src/arch/std.rs b/embassy-executor/src/arch/std.rs index b02b15988..c62ab723b 100644 --- a/embassy-executor/src/arch/std.rs +++ b/embassy-executor/src/arch/std.rs | |||
| @@ -10,9 +10,9 @@ mod thread { | |||
| 10 | 10 | ||
| 11 | pub use embassy_executor_macros::main_std as main; | 11 | pub use embassy_executor_macros::main_std as main; |
| 12 | 12 | ||
| 13 | use crate::{raw, Spawner}; | 13 | use crate::{Spawner, raw}; |
| 14 | 14 | ||
| 15 | #[export_name = "__pender"] | 15 | #[unsafe(export_name = "__pender")] |
| 16 | fn __pender(context: *mut ()) { | 16 | fn __pender(context: *mut ()) { |
| 17 | let signaler: &'static Signaler = unsafe { std::mem::transmute(context) }; | 17 | let signaler: &'static Signaler = unsafe { std::mem::transmute(context) }; |
| 18 | signaler.signal() | 18 | signaler.signal() |
diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs index f9d0f935c..d2ff2fe51 100644 --- a/embassy-executor/src/arch/wasm.rs +++ b/embassy-executor/src/arch/wasm.rs | |||
| @@ -13,9 +13,9 @@ mod thread { | |||
| 13 | use wasm_bindgen::prelude::*; | 13 | use wasm_bindgen::prelude::*; |
| 14 | 14 | ||
| 15 | use crate::raw::util::UninitCell; | 15 | use crate::raw::util::UninitCell; |
| 16 | use crate::{raw, Spawner}; | 16 | use crate::{Spawner, raw}; |
| 17 | 17 | ||
| 18 | #[export_name = "__pender"] | 18 | #[unsafe(export_name = "__pender")] |
| 19 | fn __pender(context: *mut ()) { | 19 | fn __pender(context: *mut ()) { |
| 20 | let signaler: &'static WasmContext = unsafe { std::mem::transmute(context) }; | 20 | let signaler: &'static WasmContext = unsafe { std::mem::transmute(context) }; |
| 21 | let _ = signaler.promise.then(unsafe { signaler.closure.as_mut() }); | 21 | let _ = signaler.promise.then(unsafe { signaler.closure.as_mut() }); |
