pkarashchenko commented on code in PR #6675:
URL: https://github.com/apache/incubator-nuttx/pull/6675#discussion_r927041418


##########
arch/sim/src/sim/up_idle.c:
##########
@@ -59,9 +59,13 @@ void up_idle(void)
 #ifdef CONFIG_PM
   static enum pm_state_e state = PM_NORMAL;
   enum pm_state_e newstate;
+  irqstate_t flags;
 
   /* Fake some power management stuff for testing purposes */
 
+  flags = enter_critical_section();
+  sched_lock();

Review Comment:
   why do we need both critical section and scheduler lock?



-- 
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]

Reply via email to