File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2006-2022 , RT-Thread Development Team
2
+ * Copyright (c) 2006-2024 , RT-Thread Development Team
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*
@@ -442,8 +442,10 @@ static rt_err_t _timer_start(rt_list_t *timer_list, rt_timer_t timer)
442
442
break ;
443
443
}
444
444
}
445
+ #if (RT_TIMER_SKIP_LIST_LEVEL > 1 )
445
446
if (row_lvl != RT_TIMER_SKIP_LIST_LEVEL - 1 )
446
447
row_head [row_lvl + 1 ] = row_head [row_lvl ] + 1 ;
448
+ #endif /* RT_TIMER_SKIP_LIST_LEVEL > 1 */
447
449
}
448
450
449
451
/* Interestingly, this super simple timer insert counter works very very
@@ -455,6 +457,7 @@ static rt_err_t _timer_start(rt_list_t *timer_list, rt_timer_t timer)
455
457
456
458
rt_list_insert_after (row_head [RT_TIMER_SKIP_LIST_LEVEL - 1 ],
457
459
& (timer -> row [RT_TIMER_SKIP_LIST_LEVEL - 1 ]));
460
+ #if (RT_TIMER_SKIP_LIST_LEVEL > 1 )
458
461
for (row_lvl = 2 ; row_lvl <= RT_TIMER_SKIP_LIST_LEVEL ; row_lvl ++ )
459
462
{
460
463
if (!(tst_nr & RT_TIMER_SKIP_LIST_MASK ))
@@ -466,6 +469,7 @@ static rt_err_t _timer_start(rt_list_t *timer_list, rt_timer_t timer)
466
469
* bits. */
467
470
tst_nr >>= (RT_TIMER_SKIP_LIST_MASK + 1 ) >> 1 ;
468
471
}
472
+ #endif /* RT_TIMER_SKIP_LIST_LEVEL > 1 */
469
473
470
474
timer -> parent .flag |= RT_TIMER_FLAG_ACTIVATED ;
471
475
You can’t perform that action at this time.
0 commit comments