mirror of
https://github.com/apache/nuttx.git
synced 2026-10-07 14:25:25 +00:00
arch: risc-v: Fix up_interrupt_context() for SMP
Summary: - Apply the same fix for Arm SMP Impact: - Affects SMP only Testing: - Tested with maix-bit:smp (qemu) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
bbc6571b28
commit
e8ec8fb4b4
1 changed files with 11 additions and 1 deletions
|
|
@ -67,7 +67,17 @@
|
|||
bool up_interrupt_context(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_RV64GC
|
||||
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;
|
||||
#else
|
||||
return g_current_regs != NULL;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue