diff --git a/arch/risc-v/src/common/supervisor/riscv_perform_syscall.c b/arch/risc-v/src/common/supervisor/riscv_perform_syscall.c index 224b891f06..aa36a12c65 100644 --- a/arch/risc-v/src/common/supervisor/riscv_perform_syscall.c +++ b/arch/risc-v/src/common/supervisor/riscv_perform_syscall.c @@ -65,6 +65,10 @@ void *riscv_perform_syscall(uintreg_t *regs) addrenv_switch(NULL); #endif + /* Update scheduler parameters */ + + nxsched_suspend_scheduler(g_running_tasks[this_cpu()]); + nxsched_resume_scheduler(tcb); /* Record the new "running" task. g_running_tasks[] is only used by * assertion logic for reporting crashes.