-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix missing schedule when thread actively suspends itself #10395
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
Signed-off-by: mouch6131 <[email protected]>
📌 Code Review Assignment🏷️ Tag: kernelPath: Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-06-14 09:07 UTC)
📝 Review Instructions
|
|
这部分在文档中明确有提及到,如果是suspend自己的操作需要自己后续主动进行一次调度。 |
请问是使用了什么函数,才会有线程在主动挂起自己的时候,只是把自己加到suspend list,而没有发起调度的情况呢?
这部分在文档中明确有提及到,如果是suspend自己的操作需要自己后续主动进行一次调度
|
希望suspend接口简单一些,把是否进行调度放到函数外自行来处理,而不是一刀切的方式进行调度。如果确实需要考虑,那么应该是提供两份API,一个是只suspend,一个是suspend后进行一次调度。 |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
线程在主动挂起自己的时候,只是把自己加到suspend list,而没有发起调度,这就导致当前线程还会继续执行,直到tick或者其他线程发起调度
你的解决方案是什么 (what is your solution)
在rt_thread_suspend_to_list函数中判断是否属于主动挂起自己,在这种情况下主动发起调度
请提供验证的bsp和config (provide the config and bsp)
在rk3588板子上验证成功
]
当前拉取/合并请求的状态 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