Skip to content

Commit 96a9055

Browse files
committed
kernel: idle: fix build error on arm-clang
When building sample.minimal.mt-no-preempt-no-timers.arm on arm-clang we get a link error as z_pm_save_idle_exit expects sys_clock_idle_exit to be defined. However the sample sets CONFIG_SYS_CLOCK_EXISTS=n so sys_clock_idle_exit() will not be defined by any driver. So add proper ifdef protection in z_pm_save_idle_exit to fix this. Signed-off-by: Kumar Gala <kumar.gala@intel.com>
1 parent f9fbd8a commit 96a9055

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/idle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ void z_pm_save_idle_exit(void)
2727
*/
2828
pm_system_resume();
2929
#endif /* CONFIG_PM */
30+
#ifdef CONFIG_SYS_CLOCK_EXISTS
3031
sys_clock_idle_exit();
32+
#endif
3133
}
3234

3335
void idle(void *unused1, void *unused2, void *unused3)

0 commit comments

Comments
 (0)