File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ uint64_t Scheduler::global_tick_us_{0};
3131uint32_t Scheduler::current_interval_us_{0 };
3232uint16_t Scheduler::timeout_idx_{1 };
3333
34+ uint16_t failing_id = Scheduler::INVALID_ID;
35+
3436// ----------------------------
3537
3638inline void Scheduler::global_timer_disable () {
@@ -139,6 +141,12 @@ void Scheduler_start(void) {
139141}
140142
141143void Scheduler::update () {
144+ // NOTE: Only _one_ id will be shown per call to update()
145+ if (failing_id != Scheduler::INVALID_ID) [[unlikely]] {
146+ ErrorHandler (" Too slow, could not execute task %u in time" , failing_id);
147+ failing_id = Scheduler::INVALID_ID;
148+ }
149+
142150 while (ready_bitmap_ != 0u ) {
143151 uint32_t bit_index = static_cast <uint32_t >(__builtin_ctz (ready_bitmap_));
144152
@@ -305,7 +313,7 @@ inline void Scheduler::on_timer_update() {
305313 pop_front ();
306314 // mark task as ready
307315 if ((ready_bitmap_ & task_bit) != 0 ) [[unlikely]] {
308- ErrorHandler ( " Too slow, could not execute task %u in time " , candidate_id) ;
316+ failing_id = candidate_id;
309317 }
310318 SET_BIT (ready_bitmap_, task_bit);
311319 if (task.repeating ) [[likely]] {
You can’t perform that action at this time.
0 commit comments