xiaoxiang781216 commented on code in PR #15030:
URL: https://github.com/apache/nuttx/pull/15030#discussion_r1867459129
##########
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
+ {
+#ifdef CONFIG_ARCH_ADDRENV
+ addrenv_switch(NULL);
Review Comment:
let's create a new patch which try the best to pass tcb addrenv_switch to
avoid query the current task again in addrenv_switch
##########
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
+ {
+#ifdef CONFIG_ARCH_ADDRENV
+ addrenv_switch(NULL);
+#endif
+
+ /* Update scheduler parameters */
+
+ nxsched_resume_scheduler(tcb);
Review Comment:
move before line 51
--
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]