From 240beb42af676d1d44777bd5654c4326456064b1 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 28 Sep 2020 11:03:52 -0700 Subject: [PATCH] kconfig: add configs for thread local storage Add kconfigs to indicate whether an architecture has support for thread local storage (TLS), and to enable TLS in kernel. Signed-off-by: Daniel Leung --- arch/Kconfig | 3 +++ kernel/Kconfig | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 1f8d84e4e77..3310579304d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -427,6 +427,9 @@ config ARCH_HAS_COHERENCE arch_mem_coherent() API and can link into incoherent/cached memory using the ".cached" linker section. +config ARCH_HAS_THREAD_LOCAL_STORAGE + bool + # # Other architecture related options # diff --git a/kernel/Kconfig b/kernel/Kconfig index c45bdaa8438..b394f8ab951 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -853,4 +853,10 @@ config TICKLESS_KERNEL This option enables a fully event driven kernel. Periodic system clock interrupt generation would be stopped at all times. +config THREAD_LOCAL_STORAGE + bool "Thread Local Storage (TLS)" + depends on ARCH_HAS_THREAD_LOCAL_STORAGE + help + This option enables thread local storage (TLS) support in kernel. + endmenu