Revert "sim: fix context-switch when do wdog callback()"

This reverts commit a3568af10551c37b839169634c33fbe78044725f.
This commit is contained in:
Alin Jerpelea 2024-10-16 10:31:58 +02:00 committed by Mateusz Szafoni
parent 71d57aac25
commit 1b64c80d72

View File

@ -57,15 +57,13 @@ void up_idle(void)
#ifdef CONFIG_PM
static enum pm_state_e state = PM_NORMAL;
enum pm_state_e newstate;
#endif
irqstate_t flags;
/* Fake some power management stuff for testing purposes */
flags = enter_critical_section();
sched_lock();
#ifdef CONFIG_PM
/* Fake some power management stuff for testing purposes */
newstate = pm_checkstate(PM_IDLE_DOMAIN);
if (newstate != state)
{
@ -85,8 +83,8 @@ void up_idle(void)
#ifdef CONFIG_PM
pm_changestate(PM_IDLE_DOMAIN, PM_RESTORE);
#endif
sched_unlock();
leave_critical_section(flags);
#endif
}