Skip to content

Commit

Permalink
sched/irq: correct critical section to spin lock
Browse files Browse the repository at this point in the history
Regression by:

| commit 2ee8aa6
| Author: hujun5 <[email protected]>
| 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 <[email protected]>

Signed-off-by: chao an <[email protected]>
  • Loading branch information
anchao committed Aug 21, 2024
1 parent c4d8d93 commit c4d5c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sched/irq/irq_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4d5c3e

Please sign in to comment.