xiaoxiang781216 commented on code in PR #15030:
URL: https://github.com/apache/nuttx/pull/15030#discussion_r1868787108
##########
arch/risc-v/src/common/riscv_doirq.c:
##########
@@ -76,11 +77,13 @@ uintreg_t *riscv_doirq(int irq, uintreg_t *regs)
if (regs[REG_A0] != SYS_restore_context)
{
(*running_task)->xcp.regs = regs;
+ restore_context = false;
Review Comment:
```
else
{
restore_context = true;
}
```
##########
arch/risc-v/src/common/riscv_doirq.c:
##########
@@ -61,6 +61,7 @@
uintreg_t *riscv_doirq(int irq, uintreg_t *regs)
{
struct tcb_s **running_task = &g_running_tasks[this_cpu()];
+ bool restore_context = true;
Review Comment:
```suggestion
bool restore_context = false;
```
##########
arch/risc-v/src/common/riscv_doirq.c:
##########
@@ -76,11 +77,13 @@ uintreg_t *riscv_doirq(int irq, uintreg_t *regs)
if (regs[REG_A0] != SYS_restore_context)
{
(*running_task)->xcp.regs = regs;
+ restore_context = false;
}
}
else
{
(*running_task)->xcp.regs = regs;
+ restore_context = false;
Review Comment:
remove
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]