From 35566d97c9818db70509a73f25c622e319e43429 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Mon, 14 Oct 2024 15:38:06 +0800 Subject: [PATCH] sched: fix nxsched_process_delivered did not call hook Signed-off-by: hujun5 --- arch/arm/src/armv7-a/arm_smpcall.c | 7 +++++++ arch/arm/src/armv7-r/arm_smpcall.c | 7 +++++++ arch/arm64/src/common/arm64_smpcall.c | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/arch/arm/src/armv7-a/arm_smpcall.c b/arch/arm/src/armv7-a/arm_smpcall.c index 29f5ecbcc31e6..d83b9e6835047 100644 --- a/arch/arm/src/armv7-a/arm_smpcall.c +++ b/arch/arm/src/armv7-a/arm_smpcall.c @@ -68,9 +68,16 @@ int arm_smp_sched_handler(int irq, void *context, void *arg) { + struct tcb_s *tcb; int cpu = this_cpu(); + tcb = current_task(cpu); + nxsched_suspend_scheduler(tcb); nxsched_process_delivered(cpu); + tcb = current_task(cpu); + nxsched_resume_scheduler(tcb); + + UNUSED(tcb); return OK; } diff --git a/arch/arm/src/armv7-r/arm_smpcall.c b/arch/arm/src/armv7-r/arm_smpcall.c index 524e3740057db..52844957a91ae 100644 --- a/arch/arm/src/armv7-r/arm_smpcall.c +++ b/arch/arm/src/armv7-r/arm_smpcall.c @@ -68,9 +68,16 @@ int arm_smp_sched_handler(int irq, void *context, void *arg) { + struct tcb_s *tcb; int cpu = this_cpu(); + tcb = current_task(cpu); + nxsched_suspend_scheduler(tcb); nxsched_process_delivered(cpu); + tcb = current_task(cpu); + nxsched_resume_scheduler(tcb); + + UNUSED(tcb); return OK; } diff --git a/arch/arm64/src/common/arm64_smpcall.c b/arch/arm64/src/common/arm64_smpcall.c index e1672bd21b998..0b42ba5ad4c4a 100644 --- a/arch/arm64/src/common/arm64_smpcall.c +++ b/arch/arm64/src/common/arm64_smpcall.c @@ -67,9 +67,16 @@ int arm64_smp_sched_handler(int irq, void *context, void *arg) { + struct tcb_s *tcb; int cpu = this_cpu(); + tcb = current_task(cpu); + nxsched_suspend_scheduler(tcb); nxsched_process_delivered(cpu); + tcb = current_task(cpu); + nxsched_resume_scheduler(tcb); + + UNUSED(tcb); return OK; }