From 765b75f2f8622a7f33021d3696d31104e4387333 Mon Sep 17 00:00:00 2001 From: Ryan Everett Date: Mon, 18 Mar 2024 10:20:43 +0000 Subject: [PATCH] Update docs/architecture/psa-thread-safety/psa-thread-safety.md Co-authored-by: Paul Elliott <62069445+paul-elliott-arm@users.noreply.github.com> Signed-off-by: Ryan Everett --- docs/architecture/psa-thread-safety/psa-thread-safety.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/architecture/psa-thread-safety/psa-thread-safety.md b/docs/architecture/psa-thread-safety/psa-thread-safety.md index d33e0a6c4..edb94c56b 100644 --- a/docs/architecture/psa-thread-safety/psa-thread-safety.md +++ b/docs/architecture/psa-thread-safety/psa-thread-safety.md @@ -147,6 +147,8 @@ There are two `psa_global_data_t` structs, each with a single instance `global_d A deadlock would occur if a thread attempts to lock a mutex while already holding it. Functions which need to be called while holding the global mutex have documentation to say this. +To avoid performance degradation, functions must hold mutexes for as short a time as possible. In particular, they must not start expensive operations (eg. doing cryptography) while holding the mutex. + #### Key slots