sched/irq: correct critical section to spin lock
Regression by:
| commit 2ee8aa6f2b
| Author: hujun5 <hujun5@xiaomi.com>
| Date: Thu Jan 11 11:27:31 2024 +0800
|
| sched: we use spin_lock_irqsave replace enter_critical_section to protect g_irqvector
|
| enter_critical_section may be called before os initialized
|
| Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
parent
4fa5451595
commit
4c6f75d13c
|
@ -106,7 +106,7 @@ int irq_attach(int irq, xcpt_t isr, FAR void *arg)
|
||||||
if (is_irqchain(ndx, isr))
|
if (is_irqchain(ndx, isr))
|
||||||
{
|
{
|
||||||
ret = irqchain_attach(ndx, isr, arg);
|
ret = irqchain_attach(ndx, isr, arg);
|
||||||
leave_critical_section(flags);
|
spin_unlock_irqrestore(NULL, flags);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue