sim: fix context-switch when do wdog callback()
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
dff79e8e54
commit
d8637788a7
@ -57,13 +57,15 @@ void up_idle(void)
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static enum pm_state_e state = PM_NORMAL;
|
static enum pm_state_e state = PM_NORMAL;
|
||||||
enum pm_state_e newstate;
|
enum pm_state_e newstate;
|
||||||
|
#endif
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
/* Fake some power management stuff for testing purposes */
|
|
||||||
|
|
||||||
flags = enter_critical_section();
|
flags = enter_critical_section();
|
||||||
sched_lock();
|
sched_lock();
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
/* Fake some power management stuff for testing purposes */
|
||||||
|
|
||||||
newstate = pm_checkstate(PM_IDLE_DOMAIN);
|
newstate = pm_checkstate(PM_IDLE_DOMAIN);
|
||||||
if (newstate != state)
|
if (newstate != state)
|
||||||
{
|
{
|
||||||
@ -83,8 +85,8 @@ void up_idle(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
pm_changestate(PM_IDLE_DOMAIN, PM_RESTORE);
|
pm_changestate(PM_IDLE_DOMAIN, PM_RESTORE);
|
||||||
|
#endif
|
||||||
|
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user