fdcavalcanti commented on code in PR #15815: URL: https://github.com/apache/nuttx/pull/15815#discussion_r1953025438
########## arch/risc-v/src/common/riscv_doirq.c: ########## @@ -88,13 +88,24 @@ uintreg_t *riscv_doirq(int irq, uintreg_t *regs) (*running_task)->xcp.regs = regs; } - /* Nested interrupts are not supported */ + /* Current regs non-zero indicates that we are processing an interrupt; + * current_regs is also used to manage interrupt level context switches. + * + * Nested interrupts are not supported. But an exception may occur while + * processing an interrupt. In this case, current_regs will be non-NULL. + */ - DEBUGASSERT(!up_interrupt_context()); + DEBUGASSERT(((irq > RISCV_MAX_EXCEPTION) && !up_interrupt_context()) || Review Comment: Currently running tests. So far, I believe we can have 1) as a separate PR. It looks like 2 and 3 must be together. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org