Move handling of mutex->is_valid into threading_helpers.c
This is now a field only used for testing.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/include/mbedtls/threading.h b/include/mbedtls/threading.h
index ed16a23..c136ea0 100644
--- a/include/mbedtls/threading.h
+++ b/include/mbedtls/threading.h
@@ -28,10 +28,13 @@
#include <pthread.h>
typedef struct mbedtls_threading_mutex_t {
pthread_mutex_t MBEDTLS_PRIVATE(mutex);
- /* is_valid is 0 after a failed init or a free, and nonzero after a
- * successful init. This field is not considered part of the public
- * API of Mbed TLS and may change without notice. */
+
+ /* is_valid is controlled by code in tests/src/threading_helpers - it will
+ * be 0 after a failed init or a free, and nonzero after a successful init.
+ * This field is for testing only and thus not considered part of the
+ * public API of Mbed TLS and may change without notice. */
char MBEDTLS_PRIVATE(is_valid);
+
} mbedtls_threading_mutex_t;
#endif