arch/risc-v: remove duplicated nxsched_switch_context() call

The nxsched_switch_context() function should only be called
    when a task switch actually occurs. The RISC-V architecture
    already performs this call in riscv_perform_syscall(),
    so this PR removed the redundant nxsched_switch_context() call in
    up_switch_context().

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2025-10-20 20:59:48 +08:00
committed by Xiang Xiao
parent fcb96babc5
commit fca1010a5b
@@ -80,12 +80,6 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)
else
{
/* Update scheduler parameters */
nxsched_switch_context(rtcb, tcb);
/* Then switch contexts */
riscv_switchcontext();
/* riscv_switchcontext forces a context switch to the task at the