This is an automated email from the ASF dual-hosted git repository.

acassis 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 e604bacd425 sim: it is not necessary to call restore_critical_section 
in irq
e604bacd425 is described below

commit e604bacd4258488b29afdf3fbc051bca8d3568eb
Author: hujun5 <[email protected]>
AuthorDate: Mon Jul 14 18:41:35 2025 +0800

    sim: it is not necessary to call restore_critical_section in irq
    
    Remove restore_critical_section() call from up_switch_context() in simulator
    as it is not necessary during interrupt context switching. The critical
    section state is properly managed elsewhere in the interrupt handling flow.
    
    Signed-off-by: hujun5 <[email protected]>
---
 arch/sim/src/sim/sim_switchcontext.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/sim/src/sim/sim_switchcontext.c 
b/arch/sim/src/sim/sim_switchcontext.c
index 4a10d0cd818..0693138cce4 100644
--- a/arch/sim/src/sim/sim_switchcontext.c
+++ b/arch/sim/src/sim/sim_switchcontext.c
@@ -70,10 +70,6 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)
 
       sim_savestate(rtcb->xcp.regs);
 
-      /* Restore the cpu lock */
-
-      restore_critical_section(tcb, this_cpu());
-
       /* Then switch contexts */
 
       sim_restorestate(tcb->xcp.regs);

Reply via email to