We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f3794d commit 7327fb9Copy full SHA for 7327fb9
src/timer.c
@@ -494,8 +494,6 @@ static void _timer_check(rt_list_t *timer_list, struct rt_spinlock *lock)
494
495
level = rt_spin_lock_irqsave(lock);
496
497
- current_tick = rt_tick_get();
498
-
499
rt_list_init(&list);
500
501
while (!rt_list_isempty(&timer_list[RT_TIMER_SKIP_LIST_LEVEL - 1]))
@@ -762,7 +760,7 @@ void rt_timer_check(void)
762
760
rt_tick_t next_timeout;
763
761
764
ret = _timer_list_next_timeout(_soft_timer_list, &next_timeout);
765
- if ((ret == RT_EOK) && (next_timeout <= rt_tick_get()))
+ if ((ret == RT_EOK) && ((rt_tick_get() - next_timeout) < RT_TICK_MAX / 2))
766
{
767
rt_sem_release(&_soft_timer_sem);
768
}
0 commit comments