hujun260 commented on code in PR #15129: URL: https://github.com/apache/nuttx/pull/15129#discussion_r1879395178
########## sched/sched/sched_timerexpiration.c: ########## @@ -494,19 +496,19 @@ void nxsched_timer_expiration(void) /* Get the interval associated with last expiration */ - flags = enter_critical_section(); + flags = spin_lock_irqsave_wo_note(&g_lock); up_timer_gettick(&ticks); g_timer_tick = ticks; elapsed = g_timer_interval; - leave_critical_section(flags); + spin_unlock_irqrestore_wo_note(&g_lock, flags); /* Process the timer ticks and set up the next interval (or not) */ nexttime = nxsched_timer_process(ticks, elapsed, false); - flags = enter_critical_section(); + flags = spin_lock_irqsave_wo_note(&g_lock); g_timer_interval = nxsched_timer_start(ticks, nexttime); Review Comment:  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
