You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/22 02:58:02 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6675: sim: idle pm should do PM_RESOTRE in critical section
xiaoxiang781216 commented on code in PR #6675:
URL: https://github.com/apache/incubator-nuttx/pull/6675#discussion_r927247834
##########
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:
The critical section can't block the high priority thread which is made ready in the driver pm callback. Here is the related issue: https://github.com/apache/incubator-nuttx/issues/1138
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org