Skip to content

Commit f5095d7

Browse files
GUIDINGLIxiaoxiang781216
authored andcommitted
wqueue: handle work_cancel() called in irq mode or idle thread
Signed-off-by: ligd <[email protected]>
1 parent 04e7469 commit f5095d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sched/wqueue/kwork_cancel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, int nthread,
9696
work->worker = NULL;
9797
ret = OK;
9898
}
99-
else if (nthread > 0)
99+
else if (!up_interrupt_context() && !sched_idletask() && nthread > 0)
100100
{
101101
int wndx;
102102

0 commit comments

Comments
 (0)