diff --git a/kernel/Kconfig b/kernel/Kconfig index 2bd0477ccc8..8261dedfae2 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -380,6 +380,15 @@ config ARCH_HAS_CUSTOM_SWAP_TO_MAIN the _main() thread, but instead must do something custom. It must enable this option in that case. +config ARCH_HAS_CUSTOM_BUSY_WAIT + bool + # hidden + default n + help + It's possible that an architecture port cannot or does not want to use + the provided k_busy_wait(), but instead must do something custom. It must + enable this option in that case. + config SYS_CLOCK_TICKS_PER_SEC int prompt "System tick frequency (in ticks/second)" diff --git a/kernel/thread.c b/kernel/thread.c index c552f375142..7d3e75e1590 100644 --- a/kernel/thread.c +++ b/kernel/thread.c @@ -69,6 +69,7 @@ int _is_thread_essential(void) return _current->base.user_options & K_ESSENTIAL; } +#if !defined(CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT) void k_busy_wait(u32_t usec_to_wait) { #if defined(CONFIG_TICKLESS_KERNEL) && \ @@ -96,6 +97,7 @@ int saved_always_on = k_enable_sys_clock_always_on(); _sys_clock_always_on = saved_always_on; #endif } +#endif #ifdef CONFIG_THREAD_CUSTOM_DATA void _impl_k_thread_custom_data_set(void *value)