You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/14 17:50:13 UTC
(nuttx) branch master updated: sched: fix nxsched_process_delivered did not call hook
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 d77cb8af70 sched: fix nxsched_process_delivered did not call hook
d77cb8af70 is described below
commit d77cb8af7019b348bb9c82daf0e131151d21b1ae
Author: hujun5 <hu...@xiaomi.com>
AuthorDate: Mon Oct 14 15:38:06 2024 +0800
sched: fix nxsched_process_delivered did not call hook
Signed-off-by: hujun5 <hu...@xiaomi.com>
---
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 29f5ecbcc3..d83b9e6835 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 524e374005..52844957a9 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 e1672bd21b..0b42ba5ad4 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;
}