This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f36dff8105 riscv/syscall: Fix sched_note instrumentation for
BUILD_KERNEL
f36dff8105 is described below
commit f36dff8105afe0493cb4593ee95609040c0b8aae
Author: Ville Juven <[email protected]>
AuthorDate: Wed Oct 30 15:01:31 2024 +0200
riscv/syscall: Fix sched_note instrumentation for BUILD_KERNEL
The sched_note calls were missing from riscv_perform_syscall().
---
arch/risc-v/src/common/supervisor/riscv_perform_syscall.c | 4 ++++
1 file changed, 4 insertions(+)
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.