hujun260 commented on code in PR #15030:
URL: https://github.com/apache/nuttx/pull/15030#discussion_r1868571187
##########
arch/risc-v/src/common/supervisor/riscv_perform_syscall.c:
##########
@@ -46,6 +46,16 @@ void *riscv_perform_syscall(uintreg_t *regs)
{
(*running_task)->xcp.regs = regs;
}
+ else
Review Comment:
> Another option is to set local copy of running_task = NULL if regs[REG_A0]
== SYS_restore_context, this would avoid duplicating the addrenv handling code
etc.
We hope to be able to directly use g_running_task in any scenario without it
being NULL.
--
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]