wqueue: handle work_cancel() called in irq mode or idle thread

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2024-08-30 01:52:22 +08:00
committed by Xiang Xiao
parent 04e746967a
commit f5095d781b
+1 -1
View File
@@ -96,7 +96,7 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, int nthread,
work->worker = NULL;
ret = OK;
}
else if (nthread > 0)
else if (!up_interrupt_context() && !sched_idletask() && nthread > 0)
{
int wndx;