Add global mutex for asymmetric crypto accelerator
The primary use case behind providing an abstraction layer to enable
alternative Elliptic Curve Point arithmetic implementation, is making
use of cryptographic acceleration hardware if it is present.
To provide thread safety for the hardware accelerator we need a mutex
to guard it.
diff --git a/include/mbedtls/threading.h b/include/mbedtls/threading.h
index b0c34ec..d2d79a1 100644
--- a/include/mbedtls/threading.h
+++ b/include/mbedtls/threading.h
@@ -97,6 +97,9 @@
*/
extern mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex;
extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex;
+#if defined(MBEDTLS_ECP_FUNCTION_ALT)
+extern mbedtls_threading_mutex_t mbedtls_threading_cryptohw_asym_mutex;
+#endif
#endif /* MBEDTLS_THREADING_C */
#ifdef __cplusplus