aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor')
-rw-r--r--embassy-executor/src/spawner.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/embassy-executor/src/spawner.rs b/embassy-executor/src/spawner.rs
index 7e76a09c6..fdd3ce002 100644
--- a/embassy-executor/src/spawner.rs
+++ b/embassy-executor/src/spawner.rs
@@ -34,6 +34,15 @@ impl<S> SpawnToken<S> {
34 } 34 }
35 } 35 }
36 36
37 /// Returns the task if available, otherwise 0
38 /// This can be used in combination with rtos-trace to match task names with id's
39 pub fn id(&self) -> u32 {
40 match self.raw_task {
41 None => 0,
42 Some(t) => t.as_ptr() as u32,
43 }
44 }
45
37 /// Return a SpawnToken that represents a failed spawn. 46 /// Return a SpawnToken that represents a failed spawn.
38 pub fn new_failed() -> Self { 47 pub fn new_failed() -> Self {
39 Self { 48 Self {