rt-thread
rt-thread copied to clipboard
[kernel timer]rt_timer_check 和 _soft_timer_check 函数是否可以抽出为同一份?
- 为什么没有抽出为同一个函数,不同点进行处理既可
- 是效率问题吗?
https://github.com/RT-Thread/rt-thread/blob/b586889216a4cbe7995498b40ae3a69110b3a2d4/src/timer.c#L774-L843
https://github.com/RT-Thread/rt-thread/blob/b586889216a4cbe7995498b40ae3a69110b3a2d4/src/timer.c#L670-L750
应该不是效率问题,应该是演进的时候谁也没有注意到,如果代码重复率很高,应该抽出来,后续维护的时候不容易出bug
welcome PR.
- https://github.com/RT-Thread/rt-thread/pull/8884
- 已提交