mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
arch: xtensa: Fix up_interrupt_context() for SMP
Summary: - Apply the same fix for Arm SMP Impact: - Affects SMP only Testing: - Tested with esp32-core:smp (qemu) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
patacongo
parent
e8ec8fb4b4
commit
68f102055a
@@ -59,5 +59,15 @@
|
||||
|
||||
bool up_interrupt_context(void)
|
||||
{
|
||||
return CURRENT_REGS != NULL;
|
||||
#ifdef CONFIG_SMP
|
||||
irqstate_t flags = up_irq_save();
|
||||
#endif
|
||||
|
||||
bool ret = CURRENT_REGS != NULL;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
up_irq_restore(flags);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user