diff --git a/os/rt/src/chvt.c b/os/rt/src/chvt.c index ef66a14fa..488152a1f 100644 --- a/os/rt/src/chvt.c +++ b/os/rt/src/chvt.c @@ -61,39 +61,6 @@ static inline bool is_timer(ch_delta_list_t *dlhp, ch_delta_list_t *dlp) { return (bool)(dlp != dlhp); } - -#if 0 -/** - * @brief Delta list compression. - * - * @param[in] vtlp pointer to the delta list to be compressed - * @param[in] deltanow interval to be compacted starting from "lasttime" - * - * @notapi - */ -static void vt_list_compress(virtual_timers_list_t *vtlp, - sysinterval_t deltanow) { - ch_delta_list_t *dlp = vtlp->dlist.next; - - vtlp->lasttime = chTimeAddX(vtlp->lasttime, deltanow); - - /* The loop is bounded because the delta list header has the delta field - set to (sysinterval_t)-1 which is larger than all deltas.*/ - while (dlp->delta < deltanow) { - deltanow -= dlp->delta; - dlp->delta = (sysinterval_t)0; - dlp = dlp->next; - } - - /* Adjusting next timer in the list, if any.*/ - if (is_timer(&vtlp->dlist, dlp)) { - - chDbgAssert(deltanow <= dlp->delta, "invalid delta"); - - dlp->delta -= deltanow; - } -} -#endif #endif /** @@ -146,7 +113,6 @@ static void vt_enqueue(virtual_timers_list_t *vtlp, delta is shortened to make it fit the numeric range, the timer will be triggered "deltanow" cycles earlier.*/ if (delta < deltanow) { -// vt_list_compress(vtlp, deltanow); delta = delay; }