소스 검색

[timer] Fix the bug that the linked list is still mounted when the single timer is not modified

tangyuxin 5 년 전
부모
커밋
014105025a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/timer.c

+ 2 - 2
src/timer.c

@@ -579,7 +579,7 @@ void rt_timer_check(void)
             {
             {
                 continue;
                 continue;
             }
             }
-
+            rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
             if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
             if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
                 (t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
                 (t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
             {
             {
@@ -667,7 +667,7 @@ void rt_soft_timer_check(void)
             {
             {
                 continue;
                 continue;
             }
             }
-
+            rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
             if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
             if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
                 (t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
                 (t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
             {
             {