kernel: make MULTITHREADING promptless if single-thread not supported
If single thread builds are not supported by the architecture, the MULTITHREADING option should be prompt-less to block any modifications to it. We also introduce an explicit ARCH-level Kconfig that reflects whether the ARCH is capable of single-thread Zephyr builds. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
7e7f4201df
commit
4084242a71
|
@ -464,6 +464,9 @@ endmenu
|
||||||
# Architecture Capabilities
|
# Architecture Capabilities
|
||||||
#
|
#
|
||||||
|
|
||||||
|
config ARCH_HAS_SINGLE_THREAD_SUPPORT
|
||||||
|
bool
|
||||||
|
|
||||||
config ARCH_HAS_TIMING_FUNCTIONS
|
config ARCH_HAS_TIMING_FUNCTIONS
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ config CPU_CORTEX_M
|
||||||
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
|
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
|
||||||
select HAS_CMSIS_CORE
|
select HAS_CMSIS_CORE
|
||||||
select HAS_FLASH_LOAD_OFFSET
|
select HAS_FLASH_LOAD_OFFSET
|
||||||
|
select ARCH_HAS_SINGLE_THREAD_SUPPORT
|
||||||
select ARCH_HAS_THREAD_ABORT
|
select ARCH_HAS_THREAD_ABORT
|
||||||
select ARCH_HAS_TRUSTED_EXECUTION if ARM_TRUSTZONE_M
|
select ARCH_HAS_TRUSTED_EXECUTION if ARM_TRUSTZONE_M
|
||||||
select ARCH_HAS_STACK_PROTECTION if (ARM_MPU && !ARMV6_M_ARMV8_M_BASELINE) || CPU_CORTEX_M_HAS_SPLIM
|
select ARCH_HAS_STACK_PROTECTION if (ARM_MPU && !ARMV6_M_ARMV8_M_BASELINE) || CPU_CORTEX_M_HAS_SPLIM
|
||||||
|
|
|
@ -10,7 +10,7 @@ module-str = kernel
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
config MULTITHREADING
|
config MULTITHREADING
|
||||||
bool "Multi-threading"
|
bool "Multi-threading" if ARCH_HAS_SINGLE_THREAD_SUPPORT
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
If disabled, only the main thread is available, so a main() function
|
If disabled, only the main thread is available, so a main() function
|
||||||
|
|
Loading…
Reference in a new issue