mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 15:30:25 +08:00
sim: it is not necessary to call restore_critical_section in irq
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
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 <hujun5@xiaomi.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user