Repository navigation
[drivers][workqueue] stop delayed timer when resubmitting with 0 - #12059
cms19859230182-lang wants to merge 1 commit into
Conversation
Fix RT-Thread#8477 When a delayed work item (submitted with ticks > 0) is resubmitted with ticks == 0 before its delay expires, the delayed state must be cleared and the work safely detached from the previous delayed list before inserting into the immediate work list. Cancel any pending work on a foreign workqueue before submitting, reset RT_WORK_STATE_SUBMITTING when removing from lists, and re-initialize work->list to prevent dangling list node corruption upon subsequent removal.
|
在重新提交工作项时先清理异构队列在途任务与 delayed/submitting 状态,并将节点链表安全重置,避免提前以 tick=0 触发后残留状态干扰。 |
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: @Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-11-14 19:37 CST)
📝 Review Instructions
|
|
中文
ticks=0提交时,延迟状态与原队列链表未能正确清理重置的问题。English
_workqueue_submit_work(), ensure pending work on a foreign workqueue is cancelled and delayed state is cleaned up when resubmitting withticks == 0.