From a177abbd4d47b889ebf3a8f78b64d747a98a5527 Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Mon, 6 Jan 2025 10:53:13 +0100 Subject: [PATCH] crypto: Moving threading_alt.h to the CC3XX platform The CC3XX platform contains the functions for mbedtls mutex handling: - mbedtls_mutex_init - mbedtls_mutex_free - mbedtls_mutex_lock - mbedtls_mutex_unlock These functions are not only used by the legacy mbedTLS APIs. They are also used by the PSA APIs for the PSA core mutexes: - mbedtls_threading_key_slot_mutex - mbedtls_threading_psa_globaldata_mutex - mbedtls_threading_psa_rngdata_mutex This means that even when the CC3XX legacy/PSA driver is not used, as long as the CC3XX platform is enabled the mutex handling will be provided by the CC3XX platform library. Since the CC3XX platform library provides the implementation and the threading_alt.h provides the definitions for the mutexes it makes sense to be in one place. This commit moves the threading_alt.h to the platform folder so that it can be included by applications which don't use the CC3XX mbedcrypto driver but they use Oberon PSA driver. Ref: NCSDK-31155 Signed-off-by: Georgios Vasilakis --- .../mbedtls => nrf_cc310_platform/include}/threading_alt.h | 0 .../mbedtls => nrf_cc312_platform/include}/threading_alt.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename crypto/{nrf_cc310_mbedcrypto/include/mbedtls => nrf_cc310_platform/include}/threading_alt.h (100%) rename crypto/{nrf_cc312_mbedcrypto/include/mbedtls => nrf_cc312_platform/include}/threading_alt.h (100%) diff --git a/crypto/nrf_cc310_mbedcrypto/include/mbedtls/threading_alt.h b/crypto/nrf_cc310_platform/include/threading_alt.h similarity index 100% rename from crypto/nrf_cc310_mbedcrypto/include/mbedtls/threading_alt.h rename to crypto/nrf_cc310_platform/include/threading_alt.h diff --git a/crypto/nrf_cc312_mbedcrypto/include/mbedtls/threading_alt.h b/crypto/nrf_cc312_platform/include/threading_alt.h similarity index 100% rename from crypto/nrf_cc312_mbedcrypto/include/mbedtls/threading_alt.h rename to crypto/nrf_cc312_platform/include/threading_alt.h