-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add RT_TICK_USING_64BIT Kconfig option for configure sizeof rt_tick_t #10735
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
base: master
Are you sure you want to change the base?
Conversation
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: kernelReviewers: GorrayLi ReviewSun hamburger-os lianux-mm wdfk-prog xu18838022837 Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-09-25 08:45 CST)
📝 Review Instructions
|
e89952d
to
4e9a250
Compare
d2d9fce
to
8c56986
Compare
8f4a6bf
to
4cb4d7c
Compare
这个 PR 到底几个意思?从标题看就是改个 Kconfig 选项,为啥改动还涉及几个 bsp(而且为啥是这几个而不是所有相关的?), 以及为啥还涉及 toolchain 修改以及 ci? 看上去这个 PR 引入了很多不同主题的改动。请在 PR 中详细描述修改原因,必要时需要将该 PR 拆分成多个独立的主题 PR 提交。 P.S. 本 PR 的 commit 有 6 个?是故意的划分行为,还是只是提交的一些中间过程?我建议以后 pr 统一一下规则。 |
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
4cb4d7c
to
ec1e1bc
Compare
拆出去了,主要目的是通过CI来验证这个新改动是否有问题, 通过之后就可以拆出去。 |
|
需要获取 更大的时钟,不只是 自动回绕机制的问题, 需要在32位CPU上使用 64位tick, 对于长时间运行的设备是很有用的 |
如果需求是要统计时间,不建议根据tick来做时间判断,建议用rtc |
不是时间是 单调时钟 monotonic clock |
查了下代码,就是为了解决 RTC在32位系统下精度不够的问题,看来问题解决还没到位,本想直接使用rt_tick_get,问题就解决了, 结果发现RTC相关代码调用的就是
所以瓶颈既在rt_tick_get 也在 components\drivers\ktime, 两种思路,第一种对于时钟相关,全部使用 uint64_t,第二种就是使用RT_TICK_USING_64BIT ,
这样对于64位的tick也能正确计算不溢出,目前总是使用 uint64_t,只能保证32位不溢出 |
@Guozhanxin 郭老师可以帮review下吗 |
拉取/合并请求描述:(PR description)
Replace #9496
Closes: #9482
[
为什么提交这份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