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:
chao an 2024-08-21 21:51:18 +08:00 committed by Xiang Xiao
parent 4fa5451595
commit 4c6f75d13c
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ int irq_attach(int irq, xcpt_t isr, FAR void *arg)
if (is_irqchain(ndx, isr))
{
ret = irqchain_attach(ndx, isr, arg);
leave_critical_section(flags);
spin_unlock_irqrestore(NULL, flags);
return ret;
}
#endif