aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Elliott <62069445+paul-elliott-arm@users.noreply.github.com>2024-03-15 19:50:01 +0000
committerGitHub <noreply@github.com>2024-03-15 19:50:01 +0000
commit78064ac9e09d8f32bac736f3d5f5153ce7abc0dd (patch)
tree5794256ba538c4b2e515981a32965b13089067c7 /include
parentc9db499299bcd49f7016f1a4d11a6f934628d166 (diff)
parentb24e36d07b16e2e4c7f6341f5e033ed7f4ac773f (diff)
downloadmbedtls-78064ac9e09d8f32bac736f3d5f5153ce7abc0dd.zip
mbedtls-78064ac9e09d8f32bac736f3d5f5153ce7abc0dd.tar.gz
mbedtls-78064ac9e09d8f32bac736f3d5f5153ce7abc0dd.tar.bz2
Merge pull request #8901 from paul-elliott-arm/make_psa_global_data_safe
Make PSA global_data thread safe
Diffstat (limited to 'include')
-rw-r--r--include/mbedtls/threading.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/mbedtls/threading.h b/include/mbedtls/threading.h
index b4e0502..d50d04e 100644
--- a/include/mbedtls/threading.h
+++ b/include/mbedtls/threading.h
@@ -112,6 +112,20 @@ extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex;
* psa_key_slot_state_transition(), psa_register_read(), psa_unregister_read(),
* psa_key_slot_has_readers() and psa_wipe_key_slot(). */
extern mbedtls_threading_mutex_t mbedtls_threading_key_slot_mutex;
+
+/*
+ * A mutex used to make the non-rng PSA global_data struct members thread safe.
+ *
+ * This mutex must be held when reading or writing to any of the PSA global_data
+ * structure members, other than the rng_state or rng struct. */
+extern mbedtls_threading_mutex_t mbedtls_threading_psa_globaldata_mutex;
+
+/*
+ * A mutex used to make the PSA global_data rng data thread safe.
+ *
+ * This mutex must be held when reading or writing to the PSA
+ * global_data rng_state or rng struct members. */
+extern mbedtls_threading_mutex_t mbedtls_threading_psa_rngdata_mutex;
#endif
#endif /* MBEDTLS_THREADING_C */