rtsched 0.2.0

A no_std runtime scheduler for Cortex-M thread management
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Scheduler tracing

[Documentation index](../README.md) ยท Source: [`src/diagnostics`](../src/diagnostics)

Tracing hooks are available for scheduler event counters and optional callbacks:

- `trace_counters()` returns saturating counters for context switches, RT
  deadline misses, wakeups, and cooperative yields.
- `reset_trace_counters()` resets those counters to zero.
- `set_trace_fn(fn(TraceEvent))` registers a lightweight callback for each
  traced event, and `clear_trace_fn()` removes it.

Trace callbacks run from scheduler paths that may be inside a critical section
or interrupt-triggered context switch path, so callbacks should stay short,
non-blocking, and allocation-free.