mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
arch/*/*_sigdeliver.c: Fix a race condition is signal delivery for SMP
This fixes the same issue for other targets, which was already fixed for
xtensa in commit 50d94863.
After the signals have been delivered, the local irqs need to be
disabled until the context switch. But just calling
leave_critical_section(regs[xx]) will enable them if they were
enabled in the context.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
ddf74ae059
commit
9cda3ce216
@@ -209,9 +209,7 @@ retry:
|
||||
#ifdef CONFIG_SMP
|
||||
/* We need to keep the IRQ lock until task switching */
|
||||
|
||||
rtcb->irqcount++;
|
||||
leave_critical_section((regs[REG_PSR]));
|
||||
rtcb->irqcount--;
|
||||
leave_critical_section(up_irq_save());
|
||||
#endif
|
||||
sparc_fullcontextrestore(regs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user