From 984c8e8648378e274612bd7e62dd85841ad00afa Mon Sep 17 00:00:00 2001 From: Rbb666 Date: Sun, 5 Jan 2025 13:51:36 +0800 Subject: [PATCH] =?UTF-8?q?[wq][fix]=E5=B7=A5=E4=BD=9C=E9=98=9F=E5=88=97?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8C99=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=81=8D=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/ipc/workqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/drivers/ipc/workqueue.c b/components/drivers/ipc/workqueue.c index ebe9598fbcb..30b779e4dfc 100644 --- a/components/drivers/ipc/workqueue.c +++ b/components/drivers/ipc/workqueue.c @@ -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) {