aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKat Perez <[email protected]>2025-05-08 10:58:27 -0400
committerKat Perez <[email protected]>2025-05-08 10:58:27 -0400
commit8f18810ec61ce235a4c895413936e0216ed22c4f (patch)
treeae506c111d0beaa153132c366d0345b722db3c06
parentb3e13cc6de744a241521cff20725706a1e40ef25 (diff)
remove unused tracing API
-rw-r--r--embassy-executor/src/raw/trace.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/embassy-executor/src/raw/trace.rs b/embassy-executor/src/raw/trace.rs
index 503d806bd..fec3a4834 100644
--- a/embassy-executor/src/raw/trace.rs
+++ b/embassy-executor/src/raw/trace.rs
@@ -266,23 +266,6 @@ fn get_all_active_tasks() -> impl Iterator<Item = TaskRef> + 'static {
266 } 266 }
267} 267}
268 268
269/// Get all active tasks, filtered by a predicate function
270#[cfg(feature = "trace")]
271pub fn filter_active_tasks<F>(predicate: F) -> impl Iterator<Item = TaskRef> + 'static
272where
273 F: Fn(&TaskRef) -> bool + 'static,
274{
275 get_all_active_tasks().filter(move |task| predicate(task))
276}
277
278/// Count the number of active tasks
279#[cfg(feature = "trace")]
280pub fn count_active_tasks() -> usize {
281 let mut count = 0;
282 TASK_TRACKER.for_each(|_| count += 1);
283 count
284}
285
286/// Perform an action on each active task 269/// Perform an action on each active task
287#[cfg(feature = "trace")] 270#[cfg(feature = "trace")]
288fn with_all_active_tasks<F>(f: F) 271fn with_all_active_tasks<F>(f: F)
@@ -292,18 +275,6 @@ where
292 TASK_TRACKER.for_each(f); 275 TASK_TRACKER.for_each(f);
293} 276}
294 277
295/// Get tasks by name
296#[cfg(feature = "trace")]
297pub fn get_tasks_by_name(name: &'static str) -> impl Iterator<Item = TaskRef> + 'static {
298 filter_active_tasks(move |task| task.name() == Some(name))
299}
300
301/// Get tasks by ID
302#[cfg(feature = "trace")]
303pub fn get_task_by_id(id: u32) -> Option<TaskRef> {
304 filter_active_tasks(move |task| task.id() == id).next()
305}
306
307#[cfg(feature = "rtos-trace")] 278#[cfg(feature = "rtos-trace")]
308impl rtos_trace::RtosTraceOSCallbacks for crate::raw::SyncExecutor { 279impl rtos_trace::RtosTraceOSCallbacks for crate::raw::SyncExecutor {
309 fn task_list() { 280 fn task_list() {