diff options
Diffstat (limited to 'embassy-executor')
| -rw-r--r-- | embassy-executor/src/raw/trace.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/embassy-executor/src/raw/trace.rs b/embassy-executor/src/raw/trace.rs index 593f7b0ba..6c9cfda25 100644 --- a/embassy-executor/src/raw/trace.rs +++ b/embassy-executor/src/raw/trace.rs | |||
| @@ -94,7 +94,6 @@ use crate::spawner::{SpawnError, SpawnToken, Spawner}; | |||
| 94 | /// This static provides access to the global task tracker which maintains | 94 | /// This static provides access to the global task tracker which maintains |
| 95 | /// a list of all tasks in the system. It's automatically updated by the | 95 | /// a list of all tasks in the system. It's automatically updated by the |
| 96 | /// task lifecycle hooks in the trace module. | 96 | /// task lifecycle hooks in the trace module. |
| 97 | #[cfg(feature = "trace")] | ||
| 98 | pub static TASK_TRACKER: TaskTracker = TaskTracker::new(); | 97 | pub static TASK_TRACKER: TaskTracker = TaskTracker::new(); |
| 99 | 98 | ||
| 100 | /// A thread-safe tracker for all tasks in the system | 99 | /// A thread-safe tracker for all tasks in the system |
| @@ -102,12 +101,10 @@ pub static TASK_TRACKER: TaskTracker = TaskTracker::new(); | |||
| 102 | /// This struct uses an intrusive linked list approach to track all tasks | 101 | /// This struct uses an intrusive linked list approach to track all tasks |
| 103 | /// without additional memory allocations. It maintains a global list of | 102 | /// without additional memory allocations. It maintains a global list of |
| 104 | /// tasks that can be traversed to find all currently existing tasks. | 103 | /// tasks that can be traversed to find all currently existing tasks. |
| 105 | #[cfg(feature = "trace")] | ||
| 106 | pub struct TaskTracker { | 104 | pub struct TaskTracker { |
| 107 | head: AtomicPtr<TaskHeader>, | 105 | head: AtomicPtr<TaskHeader>, |
| 108 | } | 106 | } |
| 109 | 107 | ||
| 110 | #[cfg(feature = "trace")] | ||
| 111 | impl TaskTracker { | 108 | impl TaskTracker { |
| 112 | /// Creates a new empty task tracker | 109 | /// Creates a new empty task tracker |
| 113 | /// | 110 | /// |
| @@ -172,7 +169,6 @@ impl TaskTracker { | |||
| 172 | /// This trait is only available when the `trace` feature is enabled. | 169 | /// This trait is only available when the `trace` feature is enabled. |
| 173 | /// It extends `TaskRef` with methods for accessing and modifying task identifiers | 170 | /// It extends `TaskRef` with methods for accessing and modifying task identifiers |
| 174 | /// and names, which are useful for debugging, logging, and performance analysis. | 171 | /// and names, which are useful for debugging, logging, and performance analysis. |
| 175 | #[cfg(feature = "trace")] | ||
| 176 | pub trait TaskRefTrace { | 172 | pub trait TaskRefTrace { |
| 177 | /// Get the name for a task | 173 | /// Get the name for a task |
| 178 | fn name(&self) -> Option<&'static str>; | 174 | fn name(&self) -> Option<&'static str>; |
| @@ -187,7 +183,6 @@ pub trait TaskRefTrace { | |||
| 187 | fn set_id(&self, id: u32); | 183 | fn set_id(&self, id: u32); |
| 188 | } | 184 | } |
| 189 | 185 | ||
| 190 | #[cfg(feature = "trace")] | ||
| 191 | impl TaskRefTrace for TaskRef { | 186 | impl TaskRefTrace for TaskRef { |
| 192 | fn name(&self) -> Option<&'static str> { | 187 | fn name(&self) -> Option<&'static str> { |
| 193 | self.header().name | 188 | self.header().name |
| @@ -350,7 +345,6 @@ pub(crate) fn executor_idle(executor: &SyncExecutor) { | |||
| 350 | /// | 345 | /// |
| 351 | /// # Returns | 346 | /// # Returns |
| 352 | /// An iterator that yields `TaskRef` items for each task | 347 | /// An iterator that yields `TaskRef` items for each task |
| 353 | #[cfg(feature = "trace")] | ||
| 354 | fn get_all_active_tasks() -> impl Iterator<Item = TaskRef> + 'static { | 348 | fn get_all_active_tasks() -> impl Iterator<Item = TaskRef> + 'static { |
| 355 | struct TaskIterator<'a> { | 349 | struct TaskIterator<'a> { |
| 356 | tracker: &'a TaskTracker, | 350 | tracker: &'a TaskTracker, |
| @@ -379,7 +373,6 @@ fn get_all_active_tasks() -> impl Iterator<Item = TaskRef> + 'static { | |||
| 379 | } | 373 | } |
| 380 | 374 | ||
| 381 | /// Perform an action on each active task | 375 | /// Perform an action on each active task |
| 382 | #[cfg(feature = "trace")] | ||
| 383 | fn with_all_active_tasks<F>(f: F) | 376 | fn with_all_active_tasks<F>(f: F) |
| 384 | where | 377 | where |
| 385 | F: FnMut(TaskRef), | 378 | F: FnMut(TaskRef), |
