Files
nuttx/openamp/0001-libmetal-cmake-set-HAVE_STDATOMIC_H-default-true-in-.patch
T
Bowen Wang b4a10fc63c openamp/libmetal: change the libmetal mutex to rmutex to avoid carsh
To avoid the crash when lock are acquired twice, one case is in the
destory process:
we hold the rpdev->lock to iterate the rpdev->endpoints to destory all
the endpoints, but rpmsg_destroy_ept() may send the name service message,
and need acquire the rpdev->lock again to lead crash.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-04 21:06:10 +08:00

34 lines
1017 B
Diff

From f959a2b5acccd2045c7277c3f3ddefe9bea08887 Mon Sep 17 00:00:00 2001
From: Bowen Wang <wangbowen6@xiaomi.com>
Date: Thu, 18 Dec 2025 17:26:13 +0800
Subject: [PATCH 1/3] libmetal(cmake):set HAVE_STDATOMIC_H default true in
NuttX platform
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
---
cmake/depends.cmake | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/cmake/depends.cmake libmetal/cmake/depends.cmake
index cb53903..15683f8 100644
--- a/cmake/depends.cmake
+++ libmetal/cmake/depends.cmake
@@ -24,7 +24,13 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
find_package(LibRt REQUIRED)
collect (PROJECT_LIB_DEPS "${LIBRT_LIBRARIES}")
-elseif (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "NuttX")
+elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "NuttX")
+
+ # there is no need to use cmake include detection
+ # under NuttX platform
+ set(HAVE_STDATOMIC_H true)
+
+else ()
# TODO: fix for find_path() to detect stdatomic.h
# find_path (HAVE_STDATOMIC_H stdatomic.h)
--
2.34.1