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-04-29 16:23:32 +08:00 committed by Xiang Xiao
parent 04e746967a
commit f5095d781b
1 changed files with 1 additions and 1 deletions

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;