-
Notifications
You must be signed in to change notification settings - Fork 5.2k
fix timer overflow #10368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix timer overflow #10368
Conversation
测试全部通过 |
@Rbb666 review 一下 |
@Guozhanxin 帮review 一下 |
|
没事了,有一个小bug修复了 |
跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。 |
src/timer.c
Outdated
@@ -22,6 +22,8 @@ | ||
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable | ||
* 2024-01-25 Shell add RT_TIMER_FLAG_THREAD_TIMER for timer to sync with sched | ||
* 2024-05-01 wdfk-prog The rt_timer_check and _soft_timer_check functions are merged | ||
* 2025-06-01 htl5241 remove redundancy | ||
* fix timer overflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块注释需要写到同一行
src/ipc.c
Outdated
@@ -46,6 +46,8 @@ | ||
* 2022-10-16 Bernard add prioceiling feature in mutex | ||
* 2023-04-16 Xin-zheqi redesigen queue recv and send function return real message size | ||
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable | ||
* 2025-06-01 htl5241 fix timer overflow | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余的换行请删除
@htl5241 Ci有几个格式问题,请调整下 |
你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题 |
这个软定时器就不会在没调起,直接睡死。 |
这些补丁就是逻辑补丁,很难触发,不能说不被触发。 |
ok,我先复现试着看一下 |
其他的修改在多核时稍微容易触发点,我之前优化 删除冗余rt_schedule 这个调用时就发现smp 下就会出问题,也就是多核有可能不挂起线程进入我修改的分支正好在溢出时这个线程就会出问题。 |
📌 Code Review Assignment🏷️ Tag: kernelPath: Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-06-10 11:27 UTC)
📝 Review Instructions
|
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up