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/03/02 18:15:47 UTC
(nuttx) 01/02: cpuload: remove ciritical_section() to fix recursive
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
commit 3521e6ba27b2b4270ef9b446df99323680e9b8d3
Author: ligd <li...@xiaomi.com>
AuthorDate: Thu Dec 28 13:59:35 2023 +0800
cpuload: remove ciritical_section() to fix recursive
Recursive:
25 0x44000e5a in up_cpu_paused (cpu=cpu@entry=1) at armv7-a/arm_cpupause.c:120
26 0x440032f2 in enter_critical_section () at irq/irq_csection.c:275
27 0x44006f24 in nxsched_process_taskload_ticks (tcb=tcb@entry=0x442ba638 <g_idletcb+256>, ticks=0) at sched/sched_cpuload.c:104
28 0x44007310 in nxsched_suspend_critmon (tcb=tcb@entry=0x442ba638 <g_idletcb+256>) at sched/sched_critmonitor.c:303
29 0x44006ef0 in nxsched_suspend_scheduler (tcb=tcb@entry=0x442ba638 <g_idletcb+256>) at sched/sched_suspendscheduler.c:78
30 0x44000e5a in up_cpu_paused (cpu=cpu@entry=1) at armv7-a/arm_cpupause.c:120
31 0x440032f2 in enter_critical_section () at irq/irq_csection.c:275
32 0x44000f1a in arm_pause_handler (irq=<optimized out>, context=<optimized out>, arg=<optimized out>) at armv7-a/arm_cpupause.c:216
33 0x44002ffe in irq_dispatch (irq=irq@entry=2, context=context@entry=0x4449f6b8 <g_cpu1_idlestack+1720>) at irq/irq_dispatch.c:146
34 0x44001612 in arm_doirq (irq=2, irq@entry=0, regs=0x4449f6b8 <g_cpu1_idlestack+1720>) at armv7-a/arm_doirq.c:72
35 0x44000940 in arm_decodeirq (regs=<optimized out>) at armv7-a/arm_gicv2.c:403
36 0x440000b4 in arm_vectorirq () at armv7-a/arm_vectors.S:236
Signed-off-by: ligd <li...@xiaomi.com>
---
sched/sched/sched_cpuload.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sched/sched/sched_cpuload.c b/sched/sched/sched_cpuload.c
index 59cd5d88c2..a72b0bbf2f 100644
--- a/sched/sched/sched_cpuload.c
+++ b/sched/sched/sched_cpuload.c
@@ -99,10 +99,6 @@ volatile uint32_t g_cpuload_total;
void nxsched_process_taskload_ticks(FAR struct tcb_s *tcb, uint32_t ticks)
{
- irqstate_t flags;
-
- flags = enter_critical_section();
-
tcb->ticks += ticks;
g_cpuload_total += ticks;
@@ -128,8 +124,6 @@ void nxsched_process_taskload_ticks(FAR struct tcb_s *tcb, uint32_t ticks)
g_cpuload_total = total;
}
-
- leave_critical_section(flags);
}
/****************************************************************************