From cdfbee61a9dddcb8eca619daaae8a0cdbfdfc5f0 Mon Sep 17 00:00:00 2001 From: Jiang Guang Ming Date: Mon, 25 May 2026 11:13:51 +0800 Subject: [PATCH] fix(mbedtls): make threading implementation exclusive Ensure the pthread and alternate threading implementations cannot be enabled at the same time. --- components/mbedtls/Kconfig | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/components/mbedtls/Kconfig b/components/mbedtls/Kconfig index 4f97b46f67e..93322034517 100644 --- a/components/mbedtls/Kconfig +++ b/components/mbedtls/Kconfig @@ -37,19 +37,22 @@ menu "mbedTLS" If you do intend to use contexts between threads, you will need to enable this layer to prevent race conditions. - config MBEDTLS_THREADING_ALT - bool "Enable threading alternate implementation" + choice MBEDTLS_THREADING_IMPLEMENTATION + prompt "Threading implementation" depends on MBEDTLS_THREADING_C - default n - help - Enable threading alt to allow your own alternate threading implementation. + default MBEDTLS_THREADING_PTHREAD - config MBEDTLS_THREADING_PTHREAD - bool "Enable threading pthread implementation" - depends on MBEDTLS_THREADING_C - default y - help - Enable the pthread wrapper layer for the threading layer. + config MBEDTLS_THREADING_ALT + bool "Enable threading alternate implementation" + help + Enable threading alt to allow your own alternate threading implementation. + + config MBEDTLS_THREADING_PTHREAD + bool "Enable threading pthread implementation" + help + Enable the pthread wrapper layer for the threading layer. + + endchoice config MBEDTLS_ERROR_STRINGS bool "Enable error code to error string conversion"