Skip to content
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

[wq][fix]工作队列默认使用C99标准实现遍历 #9869

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/drivers/ipc/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ static rt_err_t _workqueue_submit_work(struct rt_workqueue *queue,
work->timeout_tick = rt_tick_get() + ticks;

list_tmp = &(queue->delayed_list);
rt_list_for_each_entry(work_tmp, &(queue->delayed_list), list)
for (work_tmp = rt_list_entry(list_tmp->next, struct rt_work, list);
&work_tmp->list != list_tmp;
work_tmp = rt_list_entry(work_tmp->list.next, struct rt_work, list))
{
if ((work_tmp->timeout_tick - work->timeout_tick) < RT_TICK_MAX / 2)
{
Expand Down
Loading