From bc0fe94728def4df55dc110f1650c6d19c00d17d Mon Sep 17 00:00:00 2001 From: Laczen JMS Date: Thu, 24 Aug 2023 15:11:58 +0200 Subject: [PATCH] retained_mem: add user thread support. Fixes #61848. (cherry picked from commit c5b19cc44f4810ef2a183fec1cb7516d84bfc185) Original-Signed-off-by: Laczen JMS GitOrigin-RevId: c5b19cc44f4810ef2a183fec1cb7516d84bfc185 Change-Id: I46ca78c737d74420312884a2b207a3b865691628 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4810700 Tested-by: ChromeOS Prod (Robot) Reviewed-by: Fabio Baltieri Commit-Queue: Fabio Baltieri Tested-by: Fabio Baltieri --- drivers/retained_mem/CMakeLists.txt | 1 + include/zephyr/drivers/retained_mem.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/retained_mem/CMakeLists.txt b/drivers/retained_mem/CMakeLists.txt index f8e34a5a7c7..c119347a767 100644 --- a/drivers/retained_mem/CMakeLists.txt +++ b/drivers/retained_mem/CMakeLists.txt @@ -3,5 +3,6 @@ zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/retained_mem.h) zephyr_library() +zephyr_library_sources_ifdef(CONFIG_USERSPACE retained_mem_handlers.c) zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_NRF_GPREGRET retained_mem_nrf_gpregret.c) zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_ZEPHYR_RAM retained_mem_zephyr_ram.c) diff --git a/include/zephyr/drivers/retained_mem.h b/include/zephyr/drivers/retained_mem.h index 18bfffed099..1a4ea8e0ccc 100644 --- a/include/zephyr/drivers/retained_mem.h +++ b/include/zephyr/drivers/retained_mem.h @@ -75,7 +75,7 @@ typedef int (*retained_mem_clear_api)(const struct device *dev); * * Note that drivers must implement all functions, none of the functions are optional. */ -struct retained_mem_driver_api { +__subsystem struct retained_mem_driver_api { retained_mem_size_api size; retained_mem_read_api read; retained_mem_write_api write;