[HUST CSE][core] validate thread priority at runtime#11297
Open
Telecaster2147 wants to merge 2 commits intoRT-Thread:masterfrom
Open
[HUST CSE][core] validate thread priority at runtime#11297Telecaster2147 wants to merge 2 commits intoRT-Thread:masterfrom
Telecaster2147 wants to merge 2 commits intoRT-Thread:masterfrom
Conversation
Author
📌 Code Review Assignment🏷️ Tag: componentsReviewers: Maihuanyi Changed Files (Click to expand)
🏷️ Tag: components_lwpReviewers: xu18838022837 Changed Files (Click to expand)
🏷️ Tag: kernelReviewers: GorrayLi ReviewSun hamburger-os lianux-mm wdfk-prog xu18838022837 Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-03-28 19:39 CST)
📝 Review Instructions
|
Member
Rbb666
reviewed
Mar 25, 2026
7797e7f to
034f06d
Compare
Member
|
lgtm,然后第一条和第二条压缩成一个 commit 吧,format 的 commit 也单独保留即可,我会 rebase 合并 |
452333b to
2b81eb8
Compare
Author
好的,感谢!已经压缩完成了 |
2b81eb8 to
7349773
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
拉取/合并请求描述:(PR description)
为什么提交这份PR (why to submit this PR)
当前调度优先级更新路径对非法优先级的保护主要依赖 RT_ASSERT。在非断言构建下,越界优先级可能继续进入核心调度逻辑,带来不可预期行为。
你的解决方案是什么 (what is your solution)
本 PR 在 rt_sched_thread_change_priority() 和 rt_sched_thread_reset_priority() 中增加运行时检查:当 priority 大于等于 RT_THREAD_PRIORITY_MAX 时,直接返回 -RT_EINVAL,避免非法值继续传入内部调度更新逻辑。
请提供验证的bsp和config (provide the config and bsp)
BSP:
bsp/qemu-vexpress-a9
.config:使用 bsp/qemu-vexpress-a9/.config 做基础编译验证。
action:currently unavailable
]
当前拉取/合并请求的状态 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