mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
sim: fix regression from https://github.com/apache/nuttx/pull/14623
reason: work_timer_expiry may be called in thread context Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -68,9 +68,8 @@ static void work_timer_expiry(wdparm_t arg)
|
|||||||
{
|
{
|
||||||
FAR struct work_s *work = (FAR struct work_s *)arg;
|
FAR struct work_s *work = (FAR struct work_s *)arg;
|
||||||
|
|
||||||
DEBUGASSERT(up_interrupt_context());
|
|
||||||
|
|
||||||
irqstate_t flags = spin_lock_irqsave(&work->wq->lock);
|
irqstate_t flags = spin_lock_irqsave(&work->wq->lock);
|
||||||
|
sched_lock();
|
||||||
|
|
||||||
/* We have being canceled */
|
/* We have being canceled */
|
||||||
|
|
||||||
@@ -80,6 +79,7 @@ static void work_timer_expiry(wdparm_t arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&work->wq->lock, flags);
|
spin_unlock_irqrestore(&work->wq->lock, flags);
|
||||||
|
sched_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool work_is_canceling(FAR struct kworker_s *kworkers, int nthreads,
|
static bool work_is_canceling(FAR struct kworker_s *kworkers, int nthreads,
|
||||||
|
|||||||
Reference in New Issue
Block a user