From 563b4540faffb03823dfdab6a3c61cb6abf07544 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 15 Jun 2023 11:07:39 +0100 Subject: [PATCH] drivers: retained_mem: Allow disabling mutex support Changes the Kconfig option to allow disabling mutex support, this is to allow other Kconfig options to disable the feature. Signed-off-by: Jamie McCrae --- drivers/retained_mem/Kconfig | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/retained_mem/Kconfig b/drivers/retained_mem/Kconfig index 8f134f9456..4ea7dcd894 100644 --- a/drivers/retained_mem/Kconfig +++ b/drivers/retained_mem/Kconfig @@ -16,13 +16,18 @@ config RETAINED_MEM_INIT_PRIORITY Retained memory devices initialization priority, config RETAINED_MEM_MUTEXES - bool "Retained memory mutex support" + bool default y depends on MULTITHREADING + depends on !RETAINED_MEM_MUTEX_FORCE_DISABLE + +config RETAINED_MEM_MUTEX_FORCE_DISABLE + bool "Disable retained memory mutex support" + depends on MULTITHREADING help - Use mutexes to prevent issues with concurrent retained memory access. - Should only be disabled whereby retained memory access is required - in an ISR or for special use cases. + Disable use of mutexes which prevent issues with concurrent retained + memory access. This option should only be enabled when retained + memory access is required in an ISR or for special use cases. module = RETAINED_MEM module-str = retained_mem