From 58a0ba6dbb28413bbad19d2eb41e1f3524b0e4fa Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Wed, 24 Mar 2021 14:05:03 +0100 Subject: [PATCH] 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 --- subsys/power/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/power/power.c b/subsys/power/power.c index 9e66641f40b..cd6a532642d 100644 --- a/subsys/power/power.c +++ b/subsys/power/power.c @@ -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; }