From e604269a59acc37c0cef02c9023270d101939a77 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Mon, 23 Oct 2023 10:16:58 +0100 Subject: [PATCH] Threading Design: emphasise performance requirement Signed-off-by: Janos Follath --- docs/architecture/psa-thread-safety.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/psa-thread-safety.md b/docs/architecture/psa-thread-safety.md index 6ff834f83..5952874b8 100644 --- a/docs/architecture/psa-thread-safety.md +++ b/docs/architecture/psa-thread-safety.md @@ -404,7 +404,7 @@ Since we only have simple mutexes, locking the same mutex from the same thread i Releasing the mutex before a function call might introduce race conditions. Therefore might not be practical to take the mutex in low level access functions. If functions like that don't take the mutex, they need to rely on the caller to take it for them. These functions will document that the caller is required to hold the mutex. -To avoid performance degradation, functions must not start expensive operations (eg. doing cryptography) while holding the mutex. +To avoid performance degradation, functions must hold mutexes for as short time as possible. In particular, they must not start expensive operations (eg. doing cryptography) while holding the mutex. ## Strategy for 3.6