diff options
| author | Florian Grandel <[email protected]> | 2025-07-05 18:27:46 +0200 |
|---|---|---|
| committer | Florian Grandel <[email protected]> | 2025-07-06 19:21:12 +0200 |
| commit | b861dd172829c5b34e95644287544e090dd9f568 (patch) | |
| tree | b6bea30e7eb7097569f460ebd07f519125b0eb06 /embassy-executor/src/raw/trace.rs | |
| parent | f53b6649dd42918f7d5228d06821ac5b95e33d38 (diff) | |
embassy-executor: rtos-trace: fix task naming for new tasks
Tasks that are spawned after starting SystemViewer were not named. This
change ensures that tasks spawned while SystemViewer is running will be
properly named, too.
Signed-off-by: Florian Grandel <[email protected]>
Diffstat (limited to 'embassy-executor/src/raw/trace.rs')
| -rw-r--r-- | embassy-executor/src/raw/trace.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/embassy-executor/src/raw/trace.rs b/embassy-executor/src/raw/trace.rs index 6c9cfda25..aa27ab37e 100644 --- a/embassy-executor/src/raw/trace.rs +++ b/embassy-executor/src/raw/trace.rs | |||
| @@ -283,7 +283,17 @@ pub(crate) fn task_new(executor: &SyncExecutor, task: &TaskRef) { | |||
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | #[cfg(feature = "rtos-trace")] | 285 | #[cfg(feature = "rtos-trace")] |
| 286 | rtos_trace::trace::task_new(task.as_ptr() as u32); | 286 | { |
| 287 | rtos_trace::trace::task_new(task.as_ptr() as u32); | ||
| 288 | let name = task.name().unwrap_or("unnamed task\0"); | ||
| 289 | let info = rtos_trace::TaskInfo { | ||
| 290 | name, | ||
| 291 | priority: 0, | ||
| 292 | stack_base: 0, | ||
| 293 | stack_size: 0, | ||
| 294 | }; | ||
| 295 | rtos_trace::trace::task_send_info(task.id(), info); | ||
| 296 | } | ||
| 287 | 297 | ||
| 288 | #[cfg(feature = "rtos-trace")] | 298 | #[cfg(feature = "rtos-trace")] |
| 289 | TASK_TRACKER.add(*task); | 299 | TASK_TRACKER.add(*task); |
