power: unlock the scheduler in the pm_system_suspend

move k_sched_unlock from the pm_system_resume
to the the pm_system_suspend.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-03-24 14:05:03 +01:00 committed by Anas Nashif
commit 58a0ba6dbb

View file

@ -133,7 +133,6 @@ void pm_system_resume(void)
post_ops_done = 1;
pm_power_state_exit_post_ops(z_power_state);
pm_state_notify(false);
k_sched_unlock();
}
}
@ -231,6 +230,7 @@ enum pm_state pm_system_suspend(int32_t ticks)
#endif
pm_log_debug_info(z_power_state.state);
pm_system_resume();
k_sched_unlock();
return z_power_state.state;
}