esp32s3/rt_timer: Fix deadlock on RT-Timer thread.
The RT-Timer thread may call the `start_rt_timer` function. This function gets the spinlock with interrupts disabled to ensure exclusive access. However, this was already being performed in the RT-Timer thread, causing a deadlock.
This commit is contained in:
parent
4761af7069
commit
823a183c17
@ -572,10 +572,6 @@ static int rt_timer_thread(int argc, char *argv[])
|
||||
kmm_free(timer);
|
||||
}
|
||||
|
||||
/* Enter critical section for next scanning list */
|
||||
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
|
||||
if (raw_state == RT_TIMER_TIMEOUT)
|
||||
{
|
||||
/* Check if the timer is in "repeat" mode */
|
||||
@ -585,6 +581,10 @@ static int rt_timer_thread(int argc, char *argv[])
|
||||
start_rt_timer(timer, timer->timeout, true);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enter critical section for next scanning list */
|
||||
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user