diff options
| author | Kat Perez <[email protected]> | 2025-05-05 12:14:14 -0400 |
|---|---|---|
| committer | Kat Perez <[email protected]> | 2025-05-06 08:27:46 -0400 |
| commit | 032898adf5848da237e4bf55b8c06c2ff73cae7c (patch) | |
| tree | 1de6a0717cf4323bc035cabd1b3b2df61b7f84c6 /embassy-executor/src | |
| parent | f8f9c38b2e2527c6e3b8396e06fbb18fc1ce2a1c (diff) | |
add a stub implementation for spawn_named
When rtos-trace is not enabled, spawn_named will use spawn instead
Diffstat (limited to 'embassy-executor/src')
| -rw-r--r-- | embassy-executor/src/spawner.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/embassy-executor/src/spawner.rs b/embassy-executor/src/spawner.rs index ea754341b..f87700be6 100644 --- a/embassy-executor/src/spawner.rs +++ b/embassy-executor/src/spawner.rs | |||
| @@ -181,6 +181,13 @@ impl Spawner { | |||
| 181 | } | 181 | } |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /// When rtos-trace is disabled, spawn_named falls back to regular spawn. | ||
| 185 | /// This maintains API compatibility while optimizing out the name parameter. | ||
| 186 | #[cfg(not(feature = "rtos-trace"))] | ||
| 187 | pub fn spawn_named<S>(&self, _name: &'static str, token: SpawnToken<S>) -> Result<(), SpawnError> { | ||
| 188 | self.spawn(token) | ||
| 189 | } | ||
| 190 | |||
| 184 | // Used by the `embassy_executor_macros::main!` macro to throw an error when spawn | 191 | // Used by the `embassy_executor_macros::main!` macro to throw an error when spawn |
| 185 | // fails. This is here to allow conditional use of `defmt::unwrap!` | 192 | // fails. This is here to allow conditional use of `defmt::unwrap!` |
| 186 | // without introducing a `defmt` feature in the `embassy_executor_macros` package, | 193 | // without introducing a `defmt` feature in the `embassy_executor_macros` package, |
